From f06164b1513126769a3035bfa5fcad2ebbbcd48e Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sat, 27 Aug 2011 09:03:33 +0200 Subject: [PATCH] mark instance as extra on update --- pandora/archive/models.py | 1 - pandora/archive/tasks.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/archive/models.py b/pandora/archive/models.py index f7fae818..9dbaf211 100644 --- a/pandora/archive/models.py +++ b/pandora/archive/models.py @@ -25,7 +25,6 @@ from person.models import get_name_sort import extract - class File(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) diff --git a/pandora/archive/tasks.py b/pandora/archive/tasks.py index 90dfc837..e9cb879b 100644 --- a/pandora/archive/tasks.py +++ b/pandora/archive/tasks.py @@ -50,6 +50,9 @@ def update_or_create_instance(volume, f): setattr(instance, key, f[key]) updated=True if updated: + if instance.name.lower().startswith('extras/') or \ + instance.name.lower().startswith('versions/'): + instance.extra = True instance.save() instance.file.save() else: