From 46eb5adf1ba6d5cc235726384447cfcf9fffb30d Mon Sep 17 00:00:00 2001 From: Davide Quattrocchi Date: Thu, 10 Feb 2022 03:16:15 +0100 Subject: [PATCH] fix: avoid error on SpecialClasses creation SpecialClasses from /lib/Constants.js already have the '_' prefix, so adding it will send a double underscore to the Parse server (e.g.: '__Installation' instead of '_installation'), which resolves in an Invalid classname error, based on the SchemaController's function 'validateNewClass' --- src/dashboard/Data/Browser/CreateClassDialog.react.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashboard/Data/Browser/CreateClassDialog.react.js b/src/dashboard/Data/Browser/CreateClassDialog.react.js index 49256390be..6f17b7c178 100644 --- a/src/dashboard/Data/Browser/CreateClassDialog.react.js +++ b/src/dashboard/Data/Browser/CreateClassDialog.react.js @@ -74,14 +74,14 @@ export default class CreateClassDialog extends React.Component { showContinue={true} onContinue={async () => { let type = this.state.type; - let className = type === 'Custom' ? this.state.name : '_' + type; + let className = type === 'Custom' ? this.state.name : type; await this.props.onConfirm(className); history.push(`/apps/${this.props.currentAppSlug}/browser/${className}`); this.props.onAddColumn(); }} onConfirm={() => { let type = this.state.type; - let className = type === 'Custom' ? this.state.name : '_' + type; + let className = type === 'Custom' ? this.state.name : type; this.props.onConfirm(className); }}> {availableClasses.length > 1 ?