Skip to content

Commit

Permalink
feat(routing): route when autosave of champ used by routing rules
Browse files Browse the repository at this point in the history
  • Loading branch information
E-L-T committed May 27, 2024
1 parent 8431771 commit 16aa6ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/users/dossiers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ def update_dossier_and_compute_errors
@dossier.update_champs_attributes(champs_public_attributes_params, :public)
if @dossier.champs.any?(&:changed_for_autosave?) || @dossier.champs_public_all.any?(&:changed_for_autosave?) # TODO remove second condition after one deploy
@dossier.last_champ_updated_at = Time.zone.now

if @dossier.champs_public_all.filter(&:changed_for_autosave?).any?(&:used_by_routing_rules?)
RoutingEngine.compute(@dossier)
end
end

# We save the dossier without validating fields, and if it is successful and the client
Expand Down

0 comments on commit 16aa6ae

Please sign in to comment.