From dea746c45a466e32fbae1474d2be82d8dc2208cb Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 11 Sep 2020 15:21:13 -0700 Subject: [PATCH] Alphabetize Album's methods. --- etiquette/objects.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/etiquette/objects.py b/etiquette/objects.py index f694a0e..0561904 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -275,16 +275,6 @@ class Album(ObjectBase, GroupableMixin): def _uncache(self): self.photodb.caches['album'].remove(self.id) - @decorators.required_feature('album.edit') - @decorators.transaction - def add_child(self, *args, **kwargs): - return super().add_child(*args, **kwargs) - - @decorators.required_feature('album.edit') - @decorators.transaction - def add_children(self, *args, **kwargs): - return super().add_children(*args, **kwargs) - def _add_associated_directory(self, path): path = pathclass.Path(path) @@ -314,6 +304,16 @@ class Album(ObjectBase, GroupableMixin): for path in paths: self._add_associated_directory(path) + @decorators.required_feature('album.edit') + @decorators.transaction + def add_child(self, *args, **kwargs): + return super().add_child(*args, **kwargs) + + @decorators.required_feature('album.edit') + @decorators.transaction + def add_children(self, *args, **kwargs): + return super().add_children(*args, **kwargs) + def _add_photo(self, photo): self.photodb.log.debug('Adding photo %s to %s', photo, self) data = {'albumid': self.id, 'photoid': photo.id}