sharemetadata should never be ''

This commit is contained in:
j 2016-02-26 18:36:00 +05:30
parent 2345fc885d
commit ec81b80d2e
2 changed files with 2 additions and 1 deletions

View file

@ -161,6 +161,8 @@ class Item(db.Model):
j[key] = [j[key]]
if keys is None or 'sharemetadata' in keys:
j['sharemetadata'] = j.get('sharemetadata', False)
if not j['sharemetadata']:
j['sharemetadata'] = False
return j
def get_path(self):

View file

@ -329,7 +329,6 @@ def sortUsers(data):
}
'''
n = 0
logger.debug('sortUsers %s', data)
for id in data['ids']:
u = models.User.get(id)
u.info['index'] = n