Urgent fix for photo.remove_tags didn't check photoid==self.id.
This commit is contained in:
parent
cc79a4945d
commit
86199d05ef
1 changed files with 2 additions and 1 deletions
|
@ -1267,7 +1267,8 @@ class Photo(ObjectBase):
|
|||
self.photodb.log.info('Removing %s from %s.', tags, self)
|
||||
query = f'''
|
||||
DELETE FROM photo_tag_rel
|
||||
WHERE tagid IN {sqlhelpers.listify(tag.id for tag in tags)}
|
||||
WHERE photoid == "{self.id}"
|
||||
AND tagid IN {sqlhelpers.listify(tag.id for tag in tags)}
|
||||
'''
|
||||
self.photodb.sql_execute(query)
|
||||
|
||||
|
|
Loading…
Reference in a new issue