[GraphQL] fix a crash in mutations with an attachment
This commit is contained in:
parent
422b7f37ec
commit
6b5793f0b9
5 changed files with 41 additions and 12 deletions
|
@ -22,7 +22,7 @@ module Mutations
|
|||
end
|
||||
end
|
||||
|
||||
def authorized?(dossier:, instructeur:, motivation: nil)
|
||||
def authorized?(dossier:, instructeur:, motivation: nil, justificatif: nil)
|
||||
instructeur.is_a?(Instructeur) && instructeur.dossiers.exists?(id: dossier.id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Mutations
|
|||
end
|
||||
end
|
||||
|
||||
def authorized?(dossier:, instructeur:, motivation:)
|
||||
def authorized?(dossier:, instructeur:, motivation:, justificatif: nil)
|
||||
instructeur.is_a?(Instructeur) && instructeur.dossiers.exists?(id: dossier.id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ module Mutations
|
|||
end
|
||||
end
|
||||
|
||||
def authorized?(dossier:, instructeur:, body:)
|
||||
def authorized?(dossier:, instructeur:, body:, attachment: nil)
|
||||
instructeur.is_a?(Instructeur) && instructeur.dossiers.exists?(id: dossier.id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,7 +22,7 @@ module Mutations
|
|||
end
|
||||
end
|
||||
|
||||
def authorized?(dossier:, instructeur:, motivation:)
|
||||
def authorized?(dossier:, instructeur:, motivation:, justificatif: nil)
|
||||
instructeur.is_a?(Instructeur) && instructeur.dossiers.exists?(id: dossier.id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue