add support for user filter

This commit is contained in:
j 2013-09-15 11:56:49 +00:00
parent ad427d9b57
commit 503321c4d6

View file

@ -913,6 +913,8 @@ class Item(models.Model):
at = self.get('alternativeTitles') at = self.get('alternativeTitles')
if at: if at:
current_values += [a[0] for a in at] current_values += [a[0] for a in at]
elif key == 'user':
current_values = [self.user.username]
elif key == 'character': elif key == 'character':
current_values = filter(lambda x: x.strip(), current_values = filter(lambda x: x.strip(),
[f['character'] for f in self.get('cast', [])]) [f['character'] for f in self.get('cast', [])])