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
Thank you for the comprehensive issue report !
Issue addressed on develop branch
I'm not sure where to look for this issue, the word 'ordering' does not occur in the django-slick-reporting source anywhere!?
Yeah order by is not mentioned, now it is mentioned to disable the initial order_by that might be on a model :)
Use case: simple report for model grouped by one to many foreign key related model as in the Group By Report example.
Code example; Groups have many Sessions through a ForeignKey relation in Session.
Session:
In my reports configuration:
Now my reports don't show the correct aggregate data but rather just the values for one group session.
The generated SQL from the debugger shows why: the field
start_time
fromSession._meta['ordering']
is added to thegroup_by
clause:Removing the field
ordering
in Session class Meta removes the extra group_by field from the SQL query and gives the correct results.I'm not sure where to look for this issue, the word 'ordering' does not occur in the django-slick-reporting source anywhere!?
The text was updated successfully, but these errors were encountered: