forked from 0x2620/pandora
more find keys
This commit is contained in:
parent
656c4f7201
commit
8dca4cb676
1 changed files with 17 additions and 16 deletions
|
@ -511,11 +511,12 @@ class Item(models.Model):
|
||||||
ItemFind.objects.filter(item=self, key=key).delete()
|
ItemFind.objects.filter(item=self, key=key).delete()
|
||||||
|
|
||||||
for key in settings.CONFIG['itemKeys']:
|
for key in settings.CONFIG['itemKeys']:
|
||||||
if key.get('find'):
|
|
||||||
i = key['id']
|
i = key['id']
|
||||||
if i == 'title':
|
if i == 'title':
|
||||||
save(i, u'\n'.join([self.get('title', 'Untitled'),
|
save(i, u'\n'.join([self.get('title', 'Untitled'),
|
||||||
self.get('originalTitle', '')]))
|
self.get('originalTitle', '')]))
|
||||||
|
elif i == 'rightslevel':
|
||||||
|
save(i, self.level)
|
||||||
elif i == 'filename':
|
elif i == 'filename':
|
||||||
save(i,
|
save(i,
|
||||||
'\n'.join([f.path for f in self.files.all()]))
|
'\n'.join([f.path for f in self.files.all()]))
|
||||||
|
|
Loading…
Reference in a new issue