From 2dab2cee6807774c3b139c08cc8481c492689df6 Mon Sep 17 00:00:00 2001 From: Suchith Krishna S Donni Date: Thu, 16 Nov 2023 22:27:22 +0530 Subject: [PATCH] refactoring and removing redundant code --- frontend/src/scenes/cohorts/cohortEditLogic.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/frontend/src/scenes/cohorts/cohortEditLogic.ts b/frontend/src/scenes/cohorts/cohortEditLogic.ts index 6bd5b6fe3052e..516322b141a72 100644 --- a/frontend/src/scenes/cohorts/cohortEditLogic.ts +++ b/frontend/src/scenes/cohorts/cohortEditLogic.ts @@ -195,8 +195,6 @@ export const cohortEditLogic = kea([ forms(({ actions }) => ({ cohort: { - alwaysShowErrors: true, - showErrorsOnTouch: true, defaults: NEW_COHORT, errors: ({ id, name, csv, is_static, filters }) => ({ name: !name ? 'Cohort name cannot be empty' : undefined, @@ -234,7 +232,6 @@ export const cohortEditLogic = kea([ } }, saveCohort: async ({ cohortParams }, breakpoint) => { - console.log("reached cohort"); let cohort = { ...cohortParams } const cohortFormData = createCohortFormData(cohort) @@ -248,7 +245,6 @@ export const cohortEditLogic = kea([ } } catch (error: any) { breakpoint() - console.log("failure to save", error); lemonToast.error(error.detail || 'Failed to save cohort') return values.cohort } @@ -280,7 +276,6 @@ export const cohortEditLogic = kea([ } return processCohort(cohort) }, - }, ], duplicatedCohort: [ @@ -324,7 +319,6 @@ export const cohortEditLogic = kea([ router.actions.push(urls.cohorts()) }, submitCohort: () => { - console.log("submit cohort", values.cohortHasErrors) if(values.cohortHasErrors){ lemonToast.error('Cohort error. There was an error submiting this cohort. Make sure the cohort filters are correct.') }