[GraphQL] add better errors when attachments are not properly used
This commit is contained in:
parent
68b849c827
commit
b897e0cc1c
6 changed files with 56 additions and 0 deletions
|
@ -14,6 +14,10 @@ module Mutations
|
|||
|
||||
def resolve(dossier:, instructeur:, motivation:, justificatif: nil)
|
||||
if dossier.en_instruction?
|
||||
errors = validate_blob(justificatif)
|
||||
if errors
|
||||
return errors
|
||||
end
|
||||
dossier.refuser!(instructeur, motivation, justificatif)
|
||||
|
||||
{ dossier: dossier }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue