diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-11 12:50:02 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:24 +0100 | 
| commit | 922adb6548078da98db30000bb0bf4ea17a40be5 (patch) | |
| tree | ac16eed918a2ab34793ab8f536d77470f2df7e95 /archaeological_warehouse/models.py | |
| parent | 5e3b97cb6b4483ea2dd7f9f6ba429277fa45d0b3 (diff) | |
| download | Ishtar-922adb6548078da98db30000bb0bf4ea17a40be5.tar.bz2 Ishtar-922adb6548078da98db30000bb0bf4ea17a40be5.zip | |
responsible -> responsibility
Diffstat (limited to 'archaeological_warehouse/models.py')
| -rw-r--r-- | archaeological_warehouse/models.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py index 71c6a8145..25a57c4ae 100644 --- a/archaeological_warehouse/models.py +++ b/archaeological_warehouse/models.py @@ -643,7 +643,7 @@ class Container(DocumentItem, Merge, LightHistorizedItem,      STATISTIC_MODALITIES_OPTIONS = OrderedDict([          ("location__name", _("Location (warehouse)")), -        ("responsible__name", _("Responsible (warehouse)")), +        ("responsibility__name", _("Responsibility (warehouse)")),          ('finds__base_finds__context_record__operation__cached_label',           _("Operation")),      ]) @@ -655,7 +655,7 @@ class Container(DocumentItem, Merge, LightHistorizedItem,          'location': 'location__pk',          'location__name': "location__name",          'location_id': 'location__pk', -        'responsible_id': 'responsible__pk', +        'responsibility_id': 'responsibility__pk',          'container_type': 'container_type__pk',          'reference': 'reference__icontains',          'old_reference': 'old_reference__icontains', @@ -1417,7 +1417,8 @@ class Container(DocumentItem, Merge, LightHistorizedItem,          updated = False          if not self.index and not self.container_type.stationary:              self.skip_history_when_saving = True -            q = Container.objects.filter(responsible=self.responsible).exclude( +            q = Container.objects.filter( +                responsibility=self.responsibility).exclude(                  pk=self.pk).order_by('-index')              self.index = q.all()[0].index + 1 if q.count() else 1              updated = True | 
