diff --git a/ajapaik/ajapaik/models.py b/ajapaik/ajapaik/models.py index b22165b86..5c04a1663 100644 --- a/ajapaik/ajapaik/models.py +++ b/ajapaik/ajapaik/models.py @@ -308,6 +308,9 @@ def __init__(self, *args, **kwargs): self.original_lon = self.lon def save(self, *args, **kwargs): + if not self.id: + super(Album, self).save(*args, **kwargs) + self.set_calculated_fields() if not self.cover_photo and self.photo_count_with_subalbums > 0: random_photo = self.photos.order_by('?').first()