Alphabetize Album's methods.

This commit is contained in:
voussoir 2020-09-11 15:21:13 -07:00
parent 1cc70616a5
commit dea746c45a

View file

@ -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}