diff --git a/etiquette/objects.py b/etiquette/objects.py index 6056055..2a2def3 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -284,8 +284,7 @@ class Album(ObjectBase, GroupableMixin): @decorators.required_feature('album.edit') # GroupableMixin.add_child already has @transaction. def add_child(self, *args, **kwargs): - result = super().add_child(*args, **kwargs) - return result + return super().add_child(*args, **kwargs) @decorators.required_feature('album.edit') # GroupableMixin.add_children already has @transaction. @@ -471,6 +470,11 @@ class Album(ObjectBase, GroupableMixin): ) return rel_row is not None + @decorators.required_feature('album.edit') + # GroupableMixin.remove_child already has @transaction. + def remove_child(self, *args, **kwargs): + return super().remove_child(*args, **kwargs) + def _remove_photo(self, photo): self.photodb.log.debug('Removing photo %s from %s', photo, self) pairs = {'albumid': self.id, 'photoid': photo.id} @@ -1344,6 +1348,11 @@ class Tag(ObjectBase, GroupableMixin): def leave_group(self, *args, **kwargs): return super().leave_group(*args, **kwargs) + @decorators.required_feature('tag.edit') + # GroupableMixin.remove_child already has @transaction. + def remove_child(self, *args, **kwargs): + return super().remove_child(*args, **kwargs) + @decorators.required_feature('tag.edit') @decorators.transaction def remove_synonym(self, synname, *, commit=True):