Fix bug which left album dir associations after deleting album

This commit is contained in:
voussoir 2017-03-19 18:48:12 -07:00
parent 8793d9ff41
commit 97400a448b

View file

@ -256,6 +256,7 @@ class Album(ObjectBase, GroupableMixin):
cur = self.photodb.sql.cursor() cur = self.photodb.sql.cursor()
cur.execute('DELETE FROM albums WHERE id == ?', [self.id]) cur.execute('DELETE FROM albums WHERE id == ?', [self.id])
cur.execute('DELETE FROM album_photo_rel WHERE albumid == ?', [self.id]) cur.execute('DELETE FROM album_photo_rel WHERE albumid == ?', [self.id])
cur.execute('DELETE FROM album_associated_directories WHERE albumid == ?', [self.id])
if commit: if commit:
self.photodb.log.debug('Committing - delete album') self.photodb.log.debug('Committing - delete album')
self.photodb.commit() self.photodb.commit()