diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-04-29 11:40:35 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-04-29 11:40:35 +0200 |
commit | 6546efbcdfa4ea73e737d5a20e680d99c62fdcf1 (patch) | |
tree | fb20b85942beebebc83b57d7b845132092a37db9 /archaeological_finds/forms_treatments.py | |
parent | 962f02573fb8670b248c071450cfe766a2fe240f (diff) | |
download | Ishtar-6546efbcdfa4ea73e737d5a20e680d99c62fdcf1.tar.bz2 Ishtar-6546efbcdfa4ea73e737d5a20e680d99c62fdcf1.zip |
🐛 fix missing Add (+) button for treatment and treatement request (refs #6300)
Diffstat (limited to 'archaeological_finds/forms_treatments.py')
-rw-r--r-- | archaeological_finds/forms_treatments.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index 3b71b388d..ad12e7a18 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -259,7 +259,7 @@ class BaseTreatmentForm(CustomForm, ManageOldType): ] def __init__(self, *args, **kwargs): - user = kwargs.pop('user') + self.user = kwargs.pop('user') current_profile = get_current_profile() has_default_location = kwargs.get("data", None) or ( "initial" in kwargs and @@ -287,7 +287,7 @@ class BaseTreatmentForm(CustomForm, ManageOldType): models.TreatmentInputStatus.get_types( empty_first=False, dct={'executed': True}) - q = Person.objects.filter(ishtaruser__pk=user.pk) + q = Person.objects.filter(ishtaruser__pk=self.user.pk) if q.count(): person = q.all()[0] self.fields['scientific_monitoring_manager'].initial = person.pk @@ -825,9 +825,9 @@ class TreatmentFileForm(CustomForm, ManageOldType): ) def __init__(self, *args, **kwargs): - user = kwargs.pop('user') + self.user = kwargs.pop('user') super(TreatmentFileForm, self).__init__(*args, **kwargs) - q = Person.objects.filter(ishtaruser__pk=user.pk) + q = Person.objects.filter(ishtaruser__pk=self.user.pk) if q.count(): person = q.all()[0] self.fields['in_charge'].initial = person.pk |