Skip to content
Snippets Groups Projects
Commit 8c3e56d6 authored by Carlos Vega's avatar Carlos Vega
Browse files

avoid problems with accents in names

parent d277c966
No related branches found
No related tags found
1 merge request!256avoid problems with accents in names
Pipeline #27817 passed
......@@ -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,
......
......@@ -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()
......
......@@ -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()
......
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment