diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-08 19:29:40 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-06-08 19:29:40 +0200 |
commit | 99668d2ba6b764020062ff1f0f7c4628e5d490a1 (patch) | |
tree | 891720adce113fa107c367607ff8c6f38edb81b4 | |
parent | 3d3418d95988d3043f9fabcbf70a6ad98ad320f1 (diff) | |
parent | fe5b2c7f78372b2a89cc2bf3748a94ae9269ed0a (diff) | |
download | Ishtar-99668d2ba6b764020062ff1f0f7c4628e5d490a1.tar.bz2 Ishtar-99668d2ba6b764020062ff1f0f7c4628e5d490a1.zip |
Merge branch 'v0.9' into wheezy
-rw-r--r-- | archaeological_finds/models.py | 9 | ||||
-rw-r--r-- | version.py | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/archaeological_finds/models.py b/archaeological_finds/models.py index f527bf5d3..adfa67394 100644 --- a/archaeological_finds/models.py +++ b/archaeological_finds/models.py @@ -549,9 +549,9 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): super(Find, self).save(*args, **kwargs) q = self.base_finds if not self.index and q.count(): - operation = q.order_by( - '-context_record__operation__start_date')\ - .all() + operation = q.filter( + context_record__operation__pk__isnull=False).order_by( + '-context_record__operation__start_date') if operation.count(): operation = operation.all()[0].context_record.operation q = Find.objects\ @@ -563,7 +563,8 @@ class Find(BaseHistorizedItem, ImageModel, OwnPerms, ShortMenuItem): else: self.index = 1 self.save() - for base_find in self.base_finds.all(): + for base_find in self.base_finds.filter( + context_record__operation__pk__isnull=False).all(): modified = False if not base_find.index: modified = True diff --git a/version.py b/version.py index 45af47803..2c496f753 100644 --- a/version.py +++ b/version.py @@ -1,4 +1,4 @@ -VERSION = (0, 95, 1) +VERSION = (0, 95, 2) def get_version(): |