diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-27 20:44:52 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-06-17 13:21:27 +0200 |
commit | 0f3229a119e53054d98c5e878a9581403628cd08 (patch) | |
tree | e07ad2e91e2544f7b2d61e8f3f653fdda26bfd52 /archaeological_finds/forms_treatments.py | |
parent | cfabd636d0a6d84e8377be3e4d041b4e75ddda9a (diff) | |
download | Ishtar-0f3229a119e53054d98c5e878a9581403628cd08.tar.bz2 Ishtar-0f3229a119e53054d98c5e878a9581403628cd08.zip |
Migrate to python 3 - Clean old migrations and some old scripts
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) ] |