Hi!
Yes exactly, the ordering meta was
ordering = ('company', 'financial_year',)
and addig order_by('financial_year') to the QuerySet solved the problem (
https://stackoverflow.com/questions/50944536/django-aggregation-issue)
Thanks,
Gallusz
2018. jĂșnius 20., sz
Hello Gallusz,
This is probably caused by the `Financial.Meta.ordering` that you didn't
include in your snippet.
I assume it's currently defined as ('name', 'financial_year')?
In order to get rid of it you'll want to clear it up using an empty call to
order_by():
Financial.objects.order_by().
Hi Folks!
I have a little problem in connection with aggregation through Django's
ORM. The sketch of my model is very simple with some custom field types
(but those types are irrelevant in the problem):
# Fields types
class MoneyField(models.DecimalField):
def __init__(self, *args, **
3 matches
Mail list logo