Skip to content

Commit

Permalink
fix: generate model introspection regardless of studio (#12257)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolk authored Mar 17, 2023
1 parent ae20121 commit fec2958
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import _ from 'lodash';
import * as path from 'path';
import { S3 } from './aws-utils/aws-s3';
import { ProviderName as providerName } from './constants';
import { isAmplifyAdminApp } from './utils/admin-helpers';

/**
* Generates DataStore Models for Admin UI CMS to consume
Expand All @@ -28,10 +27,9 @@ export const adminModelgen = async (context: $TSContext, resources: $TSAny[]): P
return;
}

const { isAdminApp } = await isAmplifyAdminApp(appId);
const isDSEnabled = await isDataStoreEnabled(path.join(pathManager.getBackendDirPath(), 'api', resourceName));

if (!isAdminApp || !isDSEnabled) {
if (!isDSEnabled) {
return;
}

Expand Down

0 comments on commit fec2958

Please sign in to comment.