Browse Source

refactor: corrections

pull/7019/head
Pranav C 1 year ago
parent
commit
982ceb50b2
  1. 2
      packages/nocodb-sdk/src/lib/formulaHelpers.ts
  2. 2
      tests/playwright/tests/db/columns/columnFormula.spec.ts

2
packages/nocodb-sdk/src/lib/formulaHelpers.ts

@ -108,6 +108,8 @@ export function substituteColumnIdWithAliasInFormula(
return jsepTreeToFormula(parsedFormula);
}
// isCallExpId - is the identifier part of a call expression
// in case of call expression, we don't want to wrap the identifier in curly brackets
export function jsepTreeToFormula(node, isCallExpId = false) {
if (node.type === 'BinaryExpression' || node.type === 'LogicalExpression') {
return (

2
tests/playwright/tests/db/columns/columnFormula.spec.ts

@ -14,7 +14,7 @@ import { enableQuickRun, isPg, isSqlite } from '../../../setup/db';
* Adana 2006-02-15 04:45:25 663 Baha Blanca Parkway Turkey
*/
const formulaDataByDbType = (context: NcContext, index: number) => {
if (index === false)
if (index === 0)
return [
{
formula: '1 + 1',

Loading…
Cancel
Save