summaryrefslogtreecommitdiff
path: root/archaeological_files/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r--archaeological_files/models.py10
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"),