Skip to content
Snippets Groups Projects
Commit e9e837ca authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'encoding_issue' into 'master'

avoid problems with accents in names

See merge request NCER-PD/scheduling-system!256
parents d277c966 8c3e56d6
No related branches found
No related tags found
1 merge request!256avoid problems with accents in names
Pipeline #29073 passed
...@@ -52,7 +52,7 @@ class AppointmentForm(ModelForm): ...@@ -52,7 +52,7 @@ class AppointmentForm(ModelForm):
else: else:
previous_value = '' previous_value = ''
new_value = str(self.cleaned_data[field]) 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, p = Provenance(modified_table=Appointment._meta.db_table,
modified_table_id=self.instance.id, modified_table_id=self.instance.id,
......
...@@ -161,7 +161,7 @@ def set_as_deceased(sender, instance, **kwargs): ...@@ -161,7 +161,7 @@ def set_as_deceased(sender, instance, **kwargs):
p = Provenance(modified_table = Subject._meta.db_table, p = Provenance(modified_table = Subject._meta.db_table,
modified_table_id = instance.id, modification_author = None, modified_table_id = instance.id, modification_author = None,
previous_value = instance.dead, new_value = True, 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', modified_field = 'dead',
) )
instance.mark_as_dead() instance.mark_as_dead()
......
...@@ -92,7 +92,7 @@ def subject_edit(request, id): ...@@ -92,7 +92,7 @@ def subject_edit(request, id):
modification_author = worker, modification_author = worker,
previous_value = old_type, previous_value = old_type,
new_value = study_subject_form.cleaned_data['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), study_subject.subject, old_value, new_value),
modified_field = 'type', modified_field = 'type',
) )
...@@ -104,7 +104,7 @@ def subject_edit(request, id): ...@@ -104,7 +104,7 @@ def subject_edit(request, id):
modification_author = worker, modification_author = worker,
previous_value = was_dead, previous_value = was_dead,
new_value = True, 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', modified_field = 'dead',
) )
study_subject.subject.mark_as_dead() study_subject.subject.mark_as_dead()
...@@ -116,7 +116,7 @@ def subject_edit(request, id): ...@@ -116,7 +116,7 @@ def subject_edit(request, id):
modification_author = worker, modification_author = worker,
previous_value = was_resigned, previous_value = was_resigned,
new_value = True, 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', modified_field = 'resigned',
) )
study_subject.mark_as_resigned() study_subject.mark_as_resigned()
......
...@@ -99,7 +99,7 @@ def visit_mark(request, id, as_what): ...@@ -99,7 +99,7 @@ def visit_mark(request, id, as_what):
modification_author = worker, modification_author = worker,
previous_value = visit.is_finished, previous_value = visit.is_finished,
new_value = True, 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', modified_field = 'is_finished',
) )
visit.mark_as_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