From 3a954c79e8ce0afa4bf73d2d665817343b66cb11 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 23 Oct 2024 11:49:32 -0700 Subject: [PATCH] Update allowed phrase response types. - Add `TIME`, and sort list alphabetically. --- src/apps/activities/domain/custom_validation.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/apps/activities/domain/custom_validation.py b/src/apps/activities/domain/custom_validation.py index cfcca30b374..f9ba6a0e317 100644 --- a/src/apps/activities/domain/custom_validation.py +++ b/src/apps/activities/domain/custom_validation.py @@ -257,17 +257,18 @@ def validate_phrasal_templates(values: dict): raise IncorrectPhrasalTemplateItemError() if referenced_item.response_type not in [ - ResponseType.TEXT, - ResponseType.SINGLESELECT, + ResponseType.DATE, ResponseType.MULTISELECT, - ResponseType.SLIDER, + ResponseType.MULTISELECTROWS, ResponseType.NUMBERSELECT, - ResponseType.TIMERANGE, - ResponseType.DATE, - ResponseType.SLIDERROWS, - ResponseType.SINGLESELECTROWS, ResponseType.PARAGRAPHTEXT, - ResponseType.MULTISELECTROWS, + ResponseType.SINGLESELECT, + ResponseType.SINGLESELECTROWS, + ResponseType.SLIDER, + ResponseType.SLIDERROWS, + ResponseType.TEXT, + ResponseType.TIME, + ResponseType.TIMERANGE, ]: raise IncorrectPhrasalTemplateItemTypeError()