forked from 0x2620/pandora
one more special case for usernames
This commit is contained in:
parent
503321c4d6
commit
14674f07a6
1 changed files with 7 additions and 2 deletions
|
@ -669,7 +669,7 @@ class Item(models.Model):
|
||||||
elif i == 'user':
|
elif i == 'user':
|
||||||
if self.user:
|
if self.user:
|
||||||
save(i, self.user.username)
|
save(i, self.user.username)
|
||||||
elif key['id'] == 'annotations':
|
elif i == 'annotations':
|
||||||
qs = Annotation.objects.filter(item=self)
|
qs = Annotation.objects.filter(item=self)
|
||||||
qs = qs.filter(layer__in=Annotation.public_layers()).exclude(findvalue=None)
|
qs = qs.filter(layer__in=Annotation.public_layers()).exclude(findvalue=None)
|
||||||
qs = qs.order_by('start')
|
qs = qs.order_by('start')
|
||||||
|
@ -686,7 +686,12 @@ class Item(models.Model):
|
||||||
save(i, value)
|
save(i, value)
|
||||||
|
|
||||||
for key in self.facet_keys:
|
for key in self.facet_keys:
|
||||||
if key == 'character':
|
if key == 'user':
|
||||||
|
if self.user:
|
||||||
|
values = self.user.username
|
||||||
|
else:
|
||||||
|
values = ''
|
||||||
|
elif key == 'character':
|
||||||
values = self.get('cast', '')
|
values = self.get('cast', '')
|
||||||
if values:
|
if values:
|
||||||
values = filter(lambda x: x.strip(),
|
values = filter(lambda x: x.strip(),
|
||||||
|
|
Loading…
Reference in a new issue