Skip to content

Commit

Permalink
Merge pull request #8551 from amplication/fix/8356
Browse files Browse the repository at this point in the history
(Fix): server 8356=> BTM apply changes failed
  • Loading branch information
morhag90 committed May 27, 2024
2 parents 6e6f719 + df0765a commit e9bfc0b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions packages/amplication-server/src/core/entity/entity.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,13 @@ export class EntityService {
);
}

for (const relatedEntityField of relatedEntityFields) {
await this.deleteField(
{ where: { id: relatedEntityField.id } },
user,
fieldStrategy
);
}
try {
await this.moduleService.deleteDefaultModuleForEntity(
entity.resourceId,
Expand All @@ -856,15 +863,6 @@ export class EntityService {
error
);
}

for (const relatedEntityField of relatedEntityFields) {
await this.deleteField(
{ where: { id: relatedEntityField.id } },
user,
fieldStrategy
);
}

return this.prisma.entity.update({
where: args.where,
data: {
Expand Down

0 comments on commit e9bfc0b

Please sign in to comment.