getCipherForDiff catch missing fields in encrypted_pcd
This commit is contained in:
parent
cc2f960af0
commit
51664e62ec
@ -524,20 +524,20 @@ export default class Services {
|
||||
// get the process
|
||||
try {
|
||||
const process = await this.getProcess(diff.process_id);
|
||||
const state = process.states.find(state => state.state_id === diff.state_id);
|
||||
if (state) {
|
||||
// Now we return the encrypted value for that field
|
||||
const cipher = state.encrypted_pcd[diff.field];
|
||||
if (cipher) {
|
||||
return cipher;
|
||||
} else {
|
||||
console.error('Failed to get encrypted value');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Failed to get process:', e);
|
||||
return null;
|
||||
}
|
||||
const state = process.states.find(state => state.state_id === diff.state_id);
|
||||
if (state) {
|
||||
// Now we return the encrypted value for that field
|
||||
const cipher = state.encrypted_pcd[diff.field];
|
||||
if (cipher) {
|
||||
return cipher;
|
||||
} else {
|
||||
console.error('Failed to get encrypted value');
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user