[appdef] fixes: cloning apps (#8012)

* fixes: cloning apps

* fixes: slug status from share modal
This commit is contained in:
Arpit 2023-10-24 20:33:07 +05:30 committed by GitHub
parent bda6e886ce
commit d26d6036e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 4 deletions

View file

@ -154,7 +154,7 @@ class ManageAppUsersComponent extends React.Component {
isSlugVerificationInProgress: true,
});
appsService
.setSlug(this.state.app.id, value)
.setSlug(this.state.appId, value)
.then(() => {
this.setState({
newSlug: {

View file

@ -198,7 +198,8 @@ export class AppImportExportService {
appParamsObj: any,
appName: string,
externalResourceMappings = {},
tooljetVersion = ''
tooljetVersion = '',
cloning = false
): Promise<App> {
if (typeof appParamsObj !== 'object') {
throw new BadRequestException('Invalid params for app import');
@ -220,7 +221,9 @@ export class AppImportExportService {
schemaUnifiedAppParams.name = appName;
const importedAppTooljetVersion = extractMajorVersion(tooljetVersion);
const isNormalizedAppDefinitionSchema = isTooljetVersionWithNormalizedAppDefinitionSchem(importedAppTooljetVersion);
const isNormalizedAppDefinitionSchema = cloning
? true
: isTooljetVersionWithNormalizedAppDefinitionSchem(importedAppTooljetVersion);
const importedApp = await this.createImportedAppForUser(this.entityManager, schemaUnifiedAppParams, user);
await this.setupImportedAppAssociations(

View file

@ -68,7 +68,8 @@ export class ImportExportResourcesService {
{
tooljet_database: tableNameMapping,
},
importResourcesDto.tooljet_version
importResourcesDto.tooljet_version,
cloning
);
imports.app.push({ id: createdApp.id, name: createdApp.name });
}