Skip to content

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

check for plan number of row before duplicate model

Fendy Heryanto5b555dd256f1
diff --git a/packages/nocodb/src/utils/duplicate-model.utils.ts b/packages/nocodb/src/utils/duplicate-model.utils.ts
index 96ddfd4b65..3c23d70bac 100644
--- a/packages/nocodb/src/utils/duplicate-model.utils.ts
+++ b/packages/nocodb/src/utils/duplicate-model.utils.ts
@@ -22,6 +22,15 @@ export class DuplicateModelUtils {
return { context, isDifferent: false };
}
+ async verifyTargetContext(
+ _sourceContext: NcContext,
+ _targetContext: NcContext,
+ _modelId: string,
+ _options?: DuplicateModelJobData['options'],
+ ) {
+ return true;
+ }
+
async getDuplicateModelTaskInfo({
context,
baseId,
@@ -51,6 +60,12 @@ export class DuplicateModelUtils {
const { context: targetContext, isDifferent: isTargetContextDifferent } =
await this.getTargetContext(context, body.options);
+ await this.verifyTargetContext(
+ context,
+ targetContext,
+ modelId,
+ body.options,
+ );
if (isTargetContextDifferent) {
const baseUser = await BaseUser.get(