reset sharemetadata on removing file

This commit is contained in:
j 2016-01-22 11:17:32 +05:30
parent f8651c123f
commit ab959a4728

View file

@ -511,6 +511,8 @@ class Item(db.Model):
self.users.remove(user)
for l in self.lists.filter_by(user_id=user.id):
l.items.remove(self)
if self.meta.get('sharemetadata'):
self.meta['sharemetadata'] = False
if not self.users:
self.delete()
else: