diff options
Diffstat (limited to 'archaeological_finds/forms_treatments.py')
-rw-r--r-- | archaeological_finds/forms_treatments.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/archaeological_finds/forms_treatments.py b/archaeological_finds/forms_treatments.py index ccde70cb4..ba3e88e47 100644 --- a/archaeological_finds/forms_treatments.py +++ b/archaeological_finds/forms_treatments.py @@ -220,15 +220,15 @@ class BaseTreatmentForm(CustomForm, ManageOldType): change_current_location = [ - unicode(tp) for tp in treatment_types + str(tp) for tp in treatment_types if tp.change_current_location ] restore_reference_location = [ - unicode(tp) for tp in treatment_types + str(tp) for tp in treatment_types if tp.restore_reference_location ] change_ref_location = [ - unicode(tp) for tp in treatment_types + str(tp) for tp in treatment_types if tp.change_reference_location ] @@ -236,7 +236,7 @@ class BaseTreatmentForm(CustomForm, ManageOldType): ) and restore_reference_location: if change_ref_location: raise forms.ValidationError( - unicode( + str( _(u"{} is not compatible with {} " u"treatment(s).")).format( u' ; '.join(restore_reference_location), @@ -245,7 +245,7 @@ class BaseTreatmentForm(CustomForm, ManageOldType): ) else: raise forms.ValidationError( - unicode( + str( _(u"{} is not compatible with {} " u"treatment(s).")).format( u' ; '.join(restore_reference_location), @@ -407,7 +407,7 @@ class QAFindTreatmentForm(IshtarForm): available=True, change_reference_location=True).all()) self.treatment_type_ref_choices = u"".join([ - u"<option value='{}'>{}</option>".format(tt.pk, unicode(tt)) + u"<option value='{}'>{}</option>".format(tt.pk, str(tt)) for tt in tt_change_ref_loca ]) @@ -416,7 +416,7 @@ class QAFindTreatmentForm(IshtarForm): available=True, change_current_location=True).all()) self.treatment_type_current_choices = u"".join([ - u"<option value='{}'>{}</option>".format(tt.pk, unicode(tt)) + u"<option value='{}'>{}</option>".format(tt.pk, str(tt)) for tt in tt_change_current_loca ]) self.treatment_type_all_choices = self.treatment_type_ref_choices + \ @@ -428,7 +428,7 @@ class QAFindTreatmentForm(IshtarForm): # treatment type is dynamic put all for check self.fields['treatment_type'].choices = [ - (tt.pk, unicode(tt)) for tt in ( + (tt.pk, str(tt)) for tt in ( tt_change_ref_loca + tt_change_current_loca) ] |