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

replaced str_to_yes_no for str_to_yes_no_null

parent 291bd447
No related branches found
No related tags found
1 merge request!265Resolve "configurable study fields"
......@@ -7,7 +7,7 @@ from django.db.models import Q
from django.http import JsonResponse
from django.urls import reverse
from web.api_views.serialization_utils import bool_to_yes_no, flying_team_to_str, location_to_str, add_column, \
from web.api_views.serialization_utils import str_to_yes_no_null, bool_to_yes_no, flying_team_to_str, location_to_str, add_column, \
serialize_date, serialize_datetime, get_filters_for_data_table_request, virus_test_to_str, str_to_yes_no
from web.models import ConfigurationItem, StudySubject, Visit, Appointment, Subject, SubjectColumns, StudyColumns, \
Study, ContactAttempt
......@@ -636,7 +636,7 @@ def serialize_subject(study_subject):
val = ''
result[get_study_subject_field_id(field_value.study_subject_field)] = val
elif field_value.study_subject_field.type == CUSTOM_FIELD_TYPE_BOOLEAN:
result[get_study_subject_field_id(field_value.study_subject_field)] = str_to_yes_no(field_value.value)
result[get_study_subject_field_id(field_value.study_subject_field)] = str_to_yes_no_null(field_value.value)
elif field_value.study_subject_field.type == CUSTOM_FIELD_TYPE_DATE:
result[get_study_subject_field_id(field_value.study_subject_field)] = field_value.value
elif field_value.study_subject_field.type == CUSTOM_FIELD_TYPE_SELECT_LIST:
......
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