Commits

mickt  committed 18528fe

check for cache before using it

  • Participants
  • Parent commits 4764679

Comments (0)

Files changed (1)

File lfs/core/models.py

         """Returns the default country of the shop.
         """
         cache_key = "default-country-%s" % self.id
-        default_country = cache.get(cache_key)
-        if default_country:
-            return default_country
+        default_country = None
+        if cache:
+            default_country = cache.get(cache_key)
+            if default_country:
+                return default_country
 
         default_country = self.default_country
         if cache: