Fix admin transaction sort order
This commit is contained in:
parent
8504b77e57
commit
a8da1ff2e5
|
@ -426,7 +426,7 @@ class AdminSearchSerializer(serializers.Serializer):
|
||||||
|
|
||||||
def get_transactions(self, obj):
|
def get_transactions(self, obj):
|
||||||
queryset = obj.user.transactions
|
queryset = obj.user.transactions
|
||||||
queryset = queryset.order_by('-id', '-date')
|
queryset = queryset.order_by('-date', '-id')
|
||||||
serializer = TransactionSerializer(data=queryset, many=True)
|
serializer = TransactionSerializer(data=queryset, many=True)
|
||||||
serializer.is_valid()
|
serializer.is_valid()
|
||||||
return serializer.data
|
return serializer.data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user