From b810213d88646121181b7da05a03ae85494f6b44 Mon Sep 17 00:00:00 2001 From: Kyle Middleton Date: Fri, 22 Mar 2024 11:31:14 -0600 Subject: [PATCH] add conditional to set custom record_audio attribute to false --- client/src/redux/show/showActions.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/redux/show/showActions.js b/client/src/redux/show/showActions.js index b3fae603..756caeb3 100644 --- a/client/src/redux/show/showActions.js +++ b/client/src/redux/show/showActions.js @@ -40,6 +40,14 @@ export const postShow = (input, callback) => async dispatch => { show.repeat_rule.repeat_end_date = repeatEndDate.toDate(); } + if (show.show_details.custom == null) { + show.show_details.custom = {}; + } + + if (show.show_details.custom.record_audio == null) { + show.show_details.custom.record_audio = false; + } + const response = await axios.post(`${ROOT_SHOWS_URL}/`, show); dispatch({ type: SHOW_UPDATE, payload: response.data });