Alphabetize Photo.set_searchhidden.

This commit is contained in:
voussoir 2020-09-18 13:11:56 -07:00
parent 4b5a52abb4
commit 854f210a4f

View file

@ -1144,16 +1144,6 @@ class Photo(ObjectBase):
self.__reinit__() self.__reinit__()
@decorators.required_feature('photo.edit')
@decorators.transaction
def set_searchhidden(self, searchhidden):
data = {
'id': self.id,
'searchhidden': bool(searchhidden),
}
self.photodb.sql_update(table='photos', pairs=data, where_key='id')
self.searchhidden = searchhidden
@decorators.required_feature('photo.edit') @decorators.required_feature('photo.edit')
@decorators.transaction @decorators.transaction
def set_override_filename(self, new_filename): def set_override_filename(self, new_filename):
@ -1168,6 +1158,16 @@ class Photo(ObjectBase):
self.__reinit__() self.__reinit__()
@decorators.required_feature('photo.edit')
@decorators.transaction
def set_searchhidden(self, searchhidden):
data = {
'id': self.id,
'searchhidden': bool(searchhidden),
}
self.photodb.sql_update(table='photos', pairs=data, where_key='id')
self.searchhidden = searchhidden
class Tag(ObjectBase, GroupableMixin): class Tag(ObjectBase, GroupableMixin):
''' '''