Set @cached_property to avoid generating zip multiple times

This commit is contained in:
Alexandre Chataignon
2017-03-03 04:55:02 +01:00
parent 746c313a8d
commit fc8e9b9b51

View File

@@ -470,7 +470,7 @@ class Album(UnicodeMixin):
"""
return any(image.has_location() for image in self.images)
@property
@cached_property
def zip(self):
"""Make a ZIP archive with all media files and return its path.