diff options
Diffstat (limited to 'apps/notes/models.py')
-rw-r--r-- | apps/notes/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/notes/models.py b/apps/notes/models.py index bfcb8ba..c4b1df6 100644 --- a/apps/notes/models.py +++ b/apps/notes/models.py @@ -54,13 +54,13 @@ class Notebook(models.Model): class Meta: unique_together = ("owner", "name") + ordering = ("name", "date_created", "date_updated") def __str__(self): return self.name def save(self, **kwargs): - if self._state.adding: - self.slug = unique_slug_generator(self) + self.slug = unique_slug_generator(self) super(Notebook, self).save() @cached_property |