summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/forms_treatments.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py
index 6c22b30ee..907ea17b4 100644
--- a/archaeological_finds/forms_treatments.py
+++ b/archaeological_finds/forms_treatments.py
@@ -460,7 +460,6 @@ class QAFindTreatmentForm(IshtarForm):
for tt in tt_change_ref_loca
)
-
tt_change_current_loca = list(
models.TreatmentType.objects.filter(
available=True, change_current_location=True).all())
@@ -470,8 +469,10 @@ class QAFindTreatmentForm(IshtarForm):
for tt in tt_change_current_loca
)
- self.treatment_type_all_choices = self.treatment_type_ref_choices + \
- self.treatment_type_current_choices
+ self.treatment_type_all_choices = "".join(
+ "<option value='{}'>{}</option>".format(tt.pk, str(tt))
+ for tt in set(tt_change_current_loca + tt_change_ref_loca)
+ )
super(QAFindTreatmentForm, self).__init__(*args, **kwargs)
if not self.user:
@@ -479,7 +480,7 @@ class QAFindTreatmentForm(IshtarForm):
# treatment type is dynamic put all for check
self.fields['treatment_type'].choices = [
- (tt.pk, str(tt)) for tt in (
+ (tt.pk, str(tt)) for tt in set(
tt_change_ref_loca + tt_change_current_loca)
]