forked from 0x2620/pandora
update paths on item edit, enable editable fields in editFile, part is a string now
This commit is contained in:
parent
6916792f95
commit
3de99bb4b6
4 changed files with 21 additions and 27 deletions
|
|
@ -402,10 +402,11 @@ def editFile(request):
|
|||
#FIXME: is this to slow to run sync?
|
||||
f.item.update_selected()
|
||||
f.item.update_wanted()
|
||||
for key in ('part', 'language'):
|
||||
for key in ('extension', 'language', 'part', 'partTitle', 'version'):
|
||||
if key in data:
|
||||
setattr(f, key, data[key])
|
||||
f.auto = False
|
||||
setattr(f,
|
||||
re.sub('([A-Z])', lambda m: '_%s' % m.groups()[0].lower(), key),
|
||||
data[key])
|
||||
update = True
|
||||
if update:
|
||||
f.save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue