feat(routing): parse value
This commit is contained in:
parent
6f6bbd6ca1
commit
eca11686e2
1 changed files with 7 additions and 1 deletions
|
@ -6,7 +6,7 @@ module Administrateurs
|
|||
|
||||
def update
|
||||
left = champ_value(targeted_champ)
|
||||
right = constant(value)
|
||||
right = parsed_value
|
||||
|
||||
@procedure.groupe_instructeurs.find(groupe_instructeur_id).update!(routing_rule: ds_eq(left, right))
|
||||
end
|
||||
|
@ -21,6 +21,12 @@ module Administrateurs
|
|||
routing_params[:value]
|
||||
end
|
||||
|
||||
def parsed_value
|
||||
term = Logic.from_json(value) rescue nil
|
||||
|
||||
term.presence || constant(value)
|
||||
end
|
||||
|
||||
def groupe_instructeur_id
|
||||
routing_params[:groupe_instructeur_id]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue