diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-12 17:44:47 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-02-12 17:48:00 +0100 |
commit | c49706fbb363dffa7b910e00659d7d865072066e (patch) | |
tree | 27eeae0039a3482c4f7680729165893af5551a21 /archaeological_files/models.py | |
parent | a11b802415453d60b418c49a37eac1de1a85bdee (diff) | |
download | Ishtar-c49706fbb363dffa7b910e00659d7d865072066e.tar.bz2 Ishtar-c49706fbb363dffa7b910e00659d7d865072066e.zip |
🐛 archaeological files forms: fix preventive formset equipment service (refs #6173)
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index b45589509..26e7136b2 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -156,7 +156,15 @@ class Job(GeneralType): choices = [("", "-" * 9)] if current_value and \ current_value.pk not in [pk for pk, __ in (permanent + fixed_term)]: - choices.append((current_value.pk, str(current_value))) + if current_value.price_agreement_id == price_agreement_id: + lbl = current_value.display_label + if current_value.permanent_contract: + permanent.append((current_value.pk, lbl)) + else: + fixed_term.append((current_value.pk, lbl)) + else: + lbl = str(current_value) + choices.append((current_value.pk, lbl)) choices += [ ( _("Permanent contract"), |