]> git.parisson.com Git - teleforma.git/commitdiff
fix multiple facets
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 11 May 2015 22:35:24 +0000 (00:35 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 11 May 2015 22:35:24 +0000 (00:35 +0200)
teleforma/admin.py

index f531f2ebc44b1efdd2d8db8e77bfcaebe4bbabc5..2fa3d4cbf73a6a089291d46f3038cdc909c7fe25 100644 (file)
@@ -34,7 +34,10 @@ class PeriodListFilter(SimpleListFilter):
         provided in the query string and retrievable via
         `self.value()`.
         """
-        return queryset.filter(trainings__period__name=self.value())
+        if self.value():
+            return queryset.filter(trainings__period__name=self.value())
+        else:
+            return queryset
 
 
 class PaymentInline(admin.StackedInline):