diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-03-04 16:32:30 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-03-10 11:11:46 +0100 |
| commit | 27fff0a390ea490047f0cfced48bad92f70401d1 (patch) | |
| tree | 478158dc660f14f7c82e1f7dca660ef7575fe743 /archaeological_finds/models_finds.py | |
| parent | 5311aea5f9b9bd0fbfb12e368560ddd5d150162b (diff) | |
| download | Ishtar-27fff0a390ea490047f0cfced48bad92f70401d1.tar.bz2 Ishtar-27fff0a390ea490047f0cfced48bad92f70401d1.zip | |
🚧 Statement condition: views, forms, logic
Diffstat (limited to 'archaeological_finds/models_finds.py')
| -rw-r--r-- | archaeological_finds/models_finds.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 9e9886635..f6b0c42b8 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -226,6 +226,8 @@ class TreatmentType(HierarchicalType): else: type_list = [idx for idx, __ in types] dct["available"] = True + if empty_first and type_list: + type_list = type_list[1:] q = cls.objects.filter(**dct).exclude(pk__in=type_list) for t in q.all(): if instances: @@ -2911,6 +2913,17 @@ class Find( True, ), ] + if can_edit_find and not is_locked: + actions += [ + ( + reverse("find-statement-condition-add", args=[self.pk]), + _("Add statement condition"), + "fa fa-plus", + _("statement condition"), + "", + True, + ), + ] can_add_geo = profile.mapping and self.can_do(request, "ishtar_common.add_geovectordata") if can_add_geo: |
