diff --git a/smash/web/forms/appointment_form.py b/smash/web/forms/appointment_form.py index 3966c13ea7a11f97bab74defb7f38c20a5b29082..d59ba8eff08f35e65e0de989e5a9c89d9b5cf85c 100644 --- a/smash/web/forms/appointment_form.py +++ b/smash/web/forms/appointment_form.py @@ -52,7 +52,7 @@ class AppointmentForm(ModelForm): else: previous_value = '' new_value = str(self.cleaned_data[field]) - description = '{} changed from "{}" to "{}"'.format(field, previous_value, new_value) + description = u'{} changed from "{}" to "{}"'.format(field, previous_value, new_value) p = Provenance(modified_table=Appointment._meta.db_table, modified_table_id=self.instance.id, diff --git a/smash/web/models/subject.py b/smash/web/models/subject.py index ed90375f22a2cf53a3d70c7bea19fa00c21d1588..8781279a53a0009aae8981e3da500fad5fbde508 100644 --- a/smash/web/models/subject.py +++ b/smash/web/models/subject.py @@ -161,7 +161,7 @@ def set_as_deceased(sender, instance, **kwargs): p = Provenance(modified_table = Subject._meta.db_table, modified_table_id = instance.id, modification_author = None, previous_value = instance.dead, new_value = True, - modification_description = 'Subject "{}" marked as dead'.format(instance), + modification_description = u'Subject "{}" marked as dead'.format(instance), modified_field = 'dead', ) instance.mark_as_dead() diff --git a/smash/web/views/subject.py b/smash/web/views/subject.py index 1583412ae89e5cb740e9a6fc3aab8581fdf71ee1..5601e99b7e441774214da5b1de85b10bcd00fbc2 100644 --- a/smash/web/views/subject.py +++ b/smash/web/views/subject.py @@ -92,7 +92,7 @@ def subject_edit(request, id): modification_author = worker, previous_value = old_type, new_value = study_subject_form.cleaned_data['type'], - modification_description = 'Worker "{}" changed study subject "{}" from "{}" to "{}"'.format(worker, + modification_description = u'Worker "{}" changed study subject "{}" from "{}" to "{}"'.format(worker, study_subject.subject, old_value, new_value), modified_field = 'type', ) @@ -104,7 +104,7 @@ def subject_edit(request, id): modification_author = worker, previous_value = was_dead, new_value = True, - modification_description = 'Worker "{}" marks subject "{}" as dead'.format(worker, study_subject.subject), + modification_description = u'Worker "{}" marks subject "{}" as dead'.format(worker, study_subject.subject), modified_field = 'dead', ) study_subject.subject.mark_as_dead() @@ -116,7 +116,7 @@ def subject_edit(request, id): modification_author = worker, previous_value = was_resigned, new_value = True, - modification_description = 'Worker "{}" marks study subject "{}" as resigned from study "{}"'.format(worker, study_subject.nd_number, study_subject.study), + modification_description = u'Worker "{}" marks study subject "{}" as resigned from study "{}"'.format(worker, study_subject.nd_number, study_subject.study), modified_field = 'resigned', ) study_subject.mark_as_resigned() diff --git a/smash/web/views/visit.py b/smash/web/views/visit.py index 05d0ac44e9022231b52552752d32d64f31917ecd..c5c98c89d25c2a61cebbb0eb231f025030b8f508 100644 --- a/smash/web/views/visit.py +++ b/smash/web/views/visit.py @@ -99,7 +99,7 @@ def visit_mark(request, id, as_what): modification_author = worker, previous_value = visit.is_finished, new_value = True, - modification_description = 'Worker "{}" marked visit from "{}" as finished'.format(worker, visit.subject), + modification_description = u'Worker "{}" marked visit from "{}" as finished'.format(worker, visit.subject), modified_field = 'is_finished', ) visit.mark_as_finished()