File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed
packages/cubejs-schema-compiler/src/compiler Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -206,26 +206,12 @@ export class YamlCompiler {
206206 } else if ( typeof obj === 'string' ) {
207207 let code = obj ;
208208
209- if ( obj === '' ) {
210- return t . nullLiteral ( ) ;
211- }
212-
213- if ( code . match ( PY_TEMPLATE_SYNTAX ) ) {
214- if ( ! nonStringFields . has ( propertyPath [ propertyPath . length - 1 ] ) ) {
215- code = `f"${ this . escapeDoubleQuotes ( obj ) } "` ;
216- }
217-
218- const parsePythonAndTranspileToJsTimer225 = perfTracker . start ( 'parsePythonAndTranspileToJs call 225' ) ;
219- const ast = this . parsePythonAndTranspileToJs ( code , errorsReport ) ;
220- parsePythonAndTranspileToJsTimer225 . end ( ) ;
221- return this . extractProgramBodyIfNeeded ( ast ) ;
222- }
223-
224209 if ( ! nonStringFields . has ( propertyPath [ propertyPath . length - 1 ] ) ) {
225- return t . templateLiteral ( [ t . templateElement ( { raw : code , cooked : code } ) ] , [ ] ) ;
210+ code = `f" ${ this . escapeDoubleQuotes ( obj ) } "` ;
226211 }
227212
228- return t . identifier ( code ) ;
213+ const ast = this . parsePythonAndTranspileToJs ( code , errorsReport ) ;
214+ return this . extractProgramBodyIfNeeded ( ast ) ;
229215 } else if ( typeof obj === 'boolean' ) {
230216 return t . booleanLiteral ( obj ) ;
231217 } else if ( typeof obj === 'number' ) {
You can’t perform that action at this time.
0 commit comments