400 error occurs when using the search function while on page 2 or later in pagination #798
Unanswered
haruki-hiraiwa
asked this question in
Q&A
Replies: 2 comments
-
|
Hi, yeah you are right, might be related to #782 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Never did PRs before. As working solution I had to override list() method of ModelView in my custom view. Copied method body from current sqladmin/sqladmin/models.py. And then just replaced with This resets current page to first whenever you are trying to search something. If you typically have more than one page of search results then this solution wouldn't have much value for you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If I use the search function while on page 2 or later in pagination, I get a 400 error.

I think this is probably due to the second page not existing in the search results.
I did not see this error with sqladmin version 0.16.1, but with version 0.17.0.
So I think the error is due to the version of the library.
↓No error
sqladmin = {extras = ["full"], version = "^0.16.1"}
↓Error
sqladmin = {version = "0.17.0", extras = ["full"]}
Beta Was this translation helpful? Give feedback.
All reactions