Fix JSON.parse crashing on empty values
This commit is contained in:
parent
e2063e0fc8
commit
e7ba380d95
2 changed files with 4 additions and 2 deletions
|
@ -72,7 +72,8 @@ module Instructeurs
|
|||
end
|
||||
|
||||
def send_to_instructeurs
|
||||
recipients = Instructeur.find(JSON.parse(params[:recipients]))
|
||||
recipients = params['recipients'].presence || [].to_json
|
||||
recipients = Instructeur.find(JSON.parse(recipients))
|
||||
|
||||
recipients.each do |recipient|
|
||||
recipient.follow(dossier)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue