mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
fixes: events mapping for versioning: queries and components
This commit is contained in:
parent
085134dc72
commit
9c73b44002
1 changed files with 1 additions and 24 deletions
|
|
@ -680,17 +680,6 @@ export class AppsService {
|
|||
);
|
||||
newQuery.options = newOptions;
|
||||
|
||||
const newQueryEvents = await manager.find(EventHandler, {
|
||||
where: { appVersionId: appVersion.id, sourceId: newQuery.id },
|
||||
});
|
||||
|
||||
const updatedEvents = this.replaceDataQueryEventActionWithNewDataQueryIds(
|
||||
newQueryEvents,
|
||||
oldDataQueryToNewMapping
|
||||
);
|
||||
|
||||
await manager.save(updatedEvents);
|
||||
|
||||
await manager.save(newQuery);
|
||||
}
|
||||
|
||||
|
|
@ -721,6 +710,7 @@ export class AppsService {
|
|||
}
|
||||
}
|
||||
}
|
||||
console.log('---------arpit:: motherIndea', { oldDataQueryToNewMapping });
|
||||
|
||||
return oldDataQueryToNewMapping;
|
||||
}
|
||||
|
|
@ -750,19 +740,6 @@ export class AppsService {
|
|||
return options;
|
||||
}
|
||||
|
||||
replaceDataQueryEventActionWithNewDataQueryIds(events: EventHandler[], dataQueryMapping) {
|
||||
if (events) {
|
||||
const replacedEvents = events.map((event) => {
|
||||
if (event.event.queryId) {
|
||||
event.event.queryId = dataQueryMapping[event.event.queryId];
|
||||
}
|
||||
|
||||
return event;
|
||||
});
|
||||
return replacedEvents;
|
||||
}
|
||||
}
|
||||
|
||||
replaceDataQueryIdWithinDefinitions(definition, dataQueryMapping) {
|
||||
if (definition?.pages) {
|
||||
for (const pageId of Object.keys(definition?.pages)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue