Commits

Matthew Schinckel committed 7fdbdd5

Ensure public holidays are picked up if [] is stored in provinces, not NULL

Comments (0)

Files changed (2)

public_holidays/models.py

         qs = self.get_query_set().filter(date=date, country=country)
         
         if province:
-            qs = qs.filter(models.Q(provinces=None) | models.Q(provinces__contains=province))
+            qs = qs.filter(models.Q(provinces=None) | models.Q(provinces=[]) | models.Q(provinces__contains=province))
         
         return qs.exists()
     
 
 setup(
     name = "django-public-holidays",
-    version = "0.1.3",
+    version = "0.1.4",
     description = "Reusable public holidays for django projects",
     url = "http://bitbucket.org/schinckel/django-public-holidays/",
     author = "Matthew Schinckel",