mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-21 06:59:08 +00:00
FIX: fixed condition of getObjValueFromPath
This commit is contained in:
+1
-1
@@ -3279,7 +3279,7 @@
|
||||
"info": {
|
||||
"title": "Maestro - fix/pipeline-details-bug",
|
||||
"description": "Documentation for Maestro gateway",
|
||||
"version": "9.11.2022 - 19:28",
|
||||
"version": "9.11.2022 - 20:4",
|
||||
"contact": {}
|
||||
},
|
||||
"tags": [],
|
||||
|
||||
@@ -84,7 +84,7 @@ export class ConnectorClientService implements OnModuleInit {
|
||||
});
|
||||
const responseParsed = JSON.parse(res.message);
|
||||
const connectorErrors = responseParsed.items
|
||||
.filter((i) => i.update._index === 'connector' && i.update.error)
|
||||
.filter((i) => i.update._index === 'connectors' && i.update.error)
|
||||
.map((i) => ({
|
||||
id: i.update._id,
|
||||
reason: i.update.error,
|
||||
@@ -115,7 +115,8 @@ export class ConnectorClientService implements OnModuleInit {
|
||||
}));
|
||||
const connectorCreated = responseParsed.items
|
||||
.filter(
|
||||
(i) => i.update._index === 'connector' && i.update.result === 'created',
|
||||
(i) =>
|
||||
i.update._index === 'connectors' && i.update.result === 'created',
|
||||
)
|
||||
.map((i) => ({
|
||||
id: i.update._id,
|
||||
@@ -149,7 +150,8 @@ export class ConnectorClientService implements OnModuleInit {
|
||||
}));
|
||||
const connectorUpdated = responseParsed.items
|
||||
.filter(
|
||||
(i) => i.update._index === 'connector' && i.update.result === 'updated',
|
||||
(i) =>
|
||||
i.update._index === 'connectors' && i.update.result === 'updated',
|
||||
)
|
||||
.map((i) => ({
|
||||
id: i.update._id,
|
||||
@@ -183,7 +185,7 @@ export class ConnectorClientService implements OnModuleInit {
|
||||
}));
|
||||
const connectorNoop = responseParsed.items
|
||||
.filter(
|
||||
(i) => i.update._index === 'connector' && i.update.result === 'noop',
|
||||
(i) => i.update._index === 'connectors' && i.update.result === 'noop',
|
||||
)
|
||||
.map((i) => ({
|
||||
id: i.update._id,
|
||||
|
||||
@@ -4,7 +4,7 @@ export function getObjValueFromPath<T>(data: { object: T; path: string }): T {
|
||||
|
||||
let value = JSON.parse(JSON.stringify(object));
|
||||
for (const key of keys) {
|
||||
if (value) value = value[key];
|
||||
if (value != undefined) value = value[key];
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user