From 2ae4b482f401b3ea952362839e14645cf63b4585 Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Fri, 29 Apr 2016 09:24:07 +0000 Subject: [PATCH] DJ1.9 compat field.related --- orchestra/contrib/bills/filters.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/orchestra/contrib/bills/filters.py b/orchestra/contrib/bills/filters.py index cfc69495..9ab8a11f 100644 --- a/orchestra/contrib/bills/filters.py +++ b/orchestra/contrib/bills/filters.py @@ -98,7 +98,8 @@ class PaymentStateListFilter(SimpleListFilter): def queryset(self, request, queryset): # FIXME use queryset.computed_total instead of approx_total, bills.admin.BillAdmin.get_queryset - Transaction = queryset.model.transactions.field.related.related_model + # Transaction = queryset.model.transactions.field.remote_field.related_model + Transaction = queryset.model.transactions.related.related_model if self.value() == 'OPEN': return queryset.filter(Q(is_open=True)|Q(type=queryset.model.PROFORMA)) elif self.value() == 'PAID':