forked from 0x2620/pandora
mark instance as extra on update
This commit is contained in:
parent
b960a94711
commit
f06164b151
2 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,6 @@ from person.models import get_name_sort
|
||||||
import extract
|
import extract
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class File(models.Model):
|
class File(models.Model):
|
||||||
created = models.DateTimeField(auto_now_add=True)
|
created = models.DateTimeField(auto_now_add=True)
|
||||||
modified = models.DateTimeField(auto_now=True)
|
modified = models.DateTimeField(auto_now=True)
|
||||||
|
|
|
@ -50,6 +50,9 @@ def update_or_create_instance(volume, f):
|
||||||
setattr(instance, key, f[key])
|
setattr(instance, key, f[key])
|
||||||
updated=True
|
updated=True
|
||||||
if updated:
|
if updated:
|
||||||
|
if instance.name.lower().startswith('extras/') or \
|
||||||
|
instance.name.lower().startswith('versions/'):
|
||||||
|
instance.extra = True
|
||||||
instance.save()
|
instance.save()
|
||||||
instance.file.save()
|
instance.file.save()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue