You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default we are using column_sortable_list = column_list but this gives us an error
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1054, "Unknown column 'batches.id' in 'order clause'")
[SQL: SELECT count(*) AS count_1
FROM (SELECT batch_items.created_at AS created_at, batch_items.updated_at AS updated_at, batch_items.is_active AS is_active, batch_items.batch_id AS batch_id, batch_items.id AS id
FROM batch_items ORDER BY batches.id = batch_items.batch_id ASC) AS anon_1]
I've tried
column_sortable_list= [BatchItem.batch_id]
and
column_sortable_list= ["batch"]
none of them worked. Do you know any solution for that?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We are struggling with sorting and searching on foreign models, I can't find any solution in docs so I decided to ask about it.
So this is the model:
and the admin config
By default we are using
column_sortable_list = column_listbut this gives us an errorI've tried
and
none of them worked. Do you know any solution for that?
Beta Was this translation helpful? Give feedback.
All reactions