🐛 Gestion de l'objet de retour de l'API
parent
afee378570
commit
46f575138d
|
@ -982,8 +982,7 @@ export let mecanismSynchronisation = (recurse, k, v) => {
|
|||
let nodeValue =
|
||||
val(APIExplanation) == null
|
||||
? null
|
||||
: console.log(APIExplanation) ||
|
||||
path(v.chemin.split(' . '))(JSON.parse(val(APIExplanation)))
|
||||
: path(v.chemin.split(' . '))(val(APIExplanation))
|
||||
let missingVariables =
|
||||
val(APIExplanation) === null ? { [APIExplanation.dottedName]: 1 } : {}
|
||||
let explanation = { ...v, API: APIExplanation }
|
||||
|
|
|
@ -29,6 +29,8 @@ export let evaluateVariable = (situationGate, variableName, rule) => {
|
|||
// test rec
|
||||
let value = situationGate(variableName)
|
||||
|
||||
if (rule.API) return value && JSON.parse(value)
|
||||
|
||||
if (rule.format != null) return value
|
||||
//boolean variables don't have a format prop, it's the default
|
||||
if (formatBooleanValue[value] !== undefined) return formatBooleanValue[value]
|
||||
|
|
Loading…
Reference in New Issue