Oops, add the required_feature decorators to remove_child.
This commit is contained in:
parent
977b47522d
commit
1b90850818
1 changed files with 11 additions and 2 deletions
|
@ -284,8 +284,7 @@ class Album(ObjectBase, GroupableMixin):
|
||||||
@decorators.required_feature('album.edit')
|
@decorators.required_feature('album.edit')
|
||||||
# GroupableMixin.add_child already has @transaction.
|
# GroupableMixin.add_child already has @transaction.
|
||||||
def add_child(self, *args, **kwargs):
|
def add_child(self, *args, **kwargs):
|
||||||
result = super().add_child(*args, **kwargs)
|
return super().add_child(*args, **kwargs)
|
||||||
return result
|
|
||||||
|
|
||||||
@decorators.required_feature('album.edit')
|
@decorators.required_feature('album.edit')
|
||||||
# GroupableMixin.add_children already has @transaction.
|
# GroupableMixin.add_children already has @transaction.
|
||||||
|
@ -471,6 +470,11 @@ class Album(ObjectBase, GroupableMixin):
|
||||||
)
|
)
|
||||||
return rel_row is not None
|
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):
|
def _remove_photo(self, photo):
|
||||||
self.photodb.log.debug('Removing photo %s from %s', photo, self)
|
self.photodb.log.debug('Removing photo %s from %s', photo, self)
|
||||||
pairs = {'albumid': self.id, 'photoid': photo.id}
|
pairs = {'albumid': self.id, 'photoid': photo.id}
|
||||||
|
@ -1344,6 +1348,11 @@ class Tag(ObjectBase, GroupableMixin):
|
||||||
def leave_group(self, *args, **kwargs):
|
def leave_group(self, *args, **kwargs):
|
||||||
return super().leave_group(*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.required_feature('tag.edit')
|
||||||
@decorators.transaction
|
@decorators.transaction
|
||||||
def remove_synonym(self, synname, *, commit=True):
|
def remove_synonym(self, synname, *, commit=True):
|
||||||
|
|
Loading…
Reference in a new issue