Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: restore lookupCanHaveRecursiveEvaluation deleted by rebase

Pranav69e64dd1dfa2
diff --git a/packages/nocodb-sdk/src/lib/helperFunctions.ts b/packages/nocodb-sdk/src/lib/helperFunctions.ts
index 4d43ed0b2b..f78778d529 100644
--- a/packages/nocodb-sdk/src/lib/helperFunctions.ts
+++ b/packages/nocodb-sdk/src/lib/helperFunctions.ts
@@ -1,5 +1,5 @@
import UITypes, {isLinksOrLTAR, isNumericCol} from './UITypes';
-import { RolesObj, RolesType } from './globals';
+import { RelationTypes, RolesObj, RolesType } from './globals';
import { ClientType } from './enums';
import {
ColumnType,
@@ -326,6 +326,21 @@ export function isCrossBaseLink(col: ColumnType) {
);
}
+export function lookupCanHaveRecursiveEvaluation(param: {
+ isEeUI: boolean;
+ relationCol: ColumnType;
+ relationType: RelationTypes;
+ dbClientType: ClientType;
+}) {
+ const { isEeUI, dbClientType, relationType, relationCol } = param;
+ return (
+ isEeUI &&
+ dbClientType === ClientType.PG &&
+ isSelfReferencingTableColumn(relationCol) &&
+ [RelationTypes.HAS_MANY, RelationTypes.BELONGS_TO].includes(relationType)
+ );
+}
+
export function formatBytes(bytes, decimals = 2, base = 1000) {
if (bytes === 0) return '0 Bytes';