fix(instructeur): don't crash when adding a filter too long
This commit is contained in:
parent
5a8859cd28
commit
5ab1d45b8a
3 changed files with 29 additions and 7 deletions
|
@ -148,7 +148,9 @@ module Instructeurs
|
|||
end
|
||||
|
||||
def add_filter
|
||||
procedure_presentation.add_filter(statut, params[:field], params[:value])
|
||||
if !procedure_presentation.add_filter(statut, params[:field], params[:value])
|
||||
flash.alert = procedure_presentation.errors.full_messages
|
||||
end
|
||||
|
||||
redirect_back(fallback_location: instructeur_procedure_url(procedure))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue