diff --git a/photologue/models.py b/photologue/models.py index 29054bb..a92077f 100644 --- a/photologue/models.py +++ b/photologue/models.py @@ -263,6 +263,8 @@ class ImageModel(models.Model): return os.path.join(os.path.dirname(self.image.name), "cache") def cache_url(self): + if not self.image: + return "" return "/".join([os.path.dirname(self.image.url), "cache"]) def image_filename(self):