diff --git a/met-api/src/met_api/services/survey_service.py b/met-api/src/met_api/services/survey_service.py index 2e4b9dc59..61cc05acc 100644 --- a/met-api/src/met_api/services/survey_service.py +++ b/met-api/src/met_api/services/survey_service.py @@ -180,7 +180,7 @@ def update(cls, data: SurveySchema): is_template = survey.get('is_template', None) cls.validate_template_surveys_edit_access(is_template, user_roles) - if engagement and engagement.get('status_id', None) != Status.Draft.value: + if engagement and engagement.get('status_id', None) not in [Status.Draft.value, Status.Published.value]: raise ValueError('Engagement already published') updated_survey = SurveyModel.update_survey(data) diff --git a/met-web/src/components/survey/building/index.tsx b/met-web/src/components/survey/building/index.tsx index 01a0ec6e5..f0d9bb6cb 100644 --- a/met-web/src/components/survey/building/index.tsx +++ b/met-web/src/components/survey/building/index.tsx @@ -76,7 +76,7 @@ const SurveyFormBuilder = () => { dispatch( openNotification({ severity: 'warning', - text: 'Engagement already published. Saving is disabled.', + text: 'Engagement already published. Please be careful while editing the survey.', }), ); } @@ -410,11 +410,7 @@ const SurveyFormBuilder = () => { - + {'Save & Continue'} navigate('/surveys')}>Cancel