In the case of uncommited process, still returns data from the first state
This commit is contained in:
parent
c630aa8079
commit
085b315883
@ -699,12 +699,11 @@ export class Service {
|
|||||||
const data: Record<string, any> = {};
|
const data: Record<string, any> = {};
|
||||||
// Now we decrypt all we can in the processes
|
// Now we decrypt all we can in the processes
|
||||||
for (const [processId, process] of Object.entries(filteredProcesses)) {
|
for (const [processId, process] of Object.entries(filteredProcesses)) {
|
||||||
console.log('process roles:', this.getRoles(process));
|
|
||||||
// We also take the public data
|
// We also take the public data
|
||||||
const lastState = this.getLastCommitedState(process);
|
let lastState = this.getLastCommitedState(process);
|
||||||
if (!lastState) {
|
if (!lastState) {
|
||||||
console.error(`❌ Process ${processId} doesn't have a commited state`);
|
// fallback on the first state
|
||||||
continue;
|
lastState = process.states[0];
|
||||||
}
|
}
|
||||||
const processData: Record<string, any> = {};
|
const processData: Record<string, any> = {};
|
||||||
for (const attribute of Object.keys(lastState.public_data)) {
|
for (const attribute of Object.keys(lastState.public_data)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user