diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-05-12 17:02:56 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-05-12 17:02:56 +0200 |
commit | 659b0b0b1e59e845fe0843854293c771a01113a9 (patch) | |
tree | 592a834685dac25aad04bb0f4505ec9006e787b4 /archaeological_operations/models.py | |
parent | 61326514adae5918310a69b181dc3d75f4ee9e7c (diff) | |
download | Ishtar-659b0b0b1e59e845fe0843854293c771a01113a9.tar.bz2 Ishtar-659b0b0b1e59e845fe0843854293c771a01113a9.zip |
Work on registry search (refs #1680) - work on operations test
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 65f544721..7bd84c6e7 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -58,6 +58,10 @@ class OperationType(GeneralType): except cls.DoesNotExist: pass items = cls.objects.filter(**dct) + if default: + exclude.append(default.txt_idx) + if exclude: + items = items.exclude(txt_idx__in=exclude) current_preventive, current_lst = None, None for item in items.order_by(*cls._meta.ordering).all(): if not current_lst or item.preventive != current_preventive: @@ -486,6 +490,7 @@ class AdministrativeAct(BaseHistorizedItem, OwnPerms, ValueGetter): _prefix = 'adminact_' class Meta: + ordering = ('index', 'act_type') verbose_name = _(u"Administrative act") verbose_name_plural = _(u"Administrative acts") permissions = ( |