mirror of
https://github.com/ash-project/ash_graphql.git
synced 2024-09-20 05:13:33 +12:00
fix: Check for nil rather than the value as not
does not accept a function (#23)
Co-authored-by: Simon Bergström <simon.bergstrom@erlang-solutions.com>
This commit is contained in:
parent
e8e3624ce5
commit
c222e8088a
1 changed files with 1 additions and 1 deletions
|
@ -634,7 +634,7 @@ defmodule AshGraphql.Resource do
|
||||||
|> Enum.filter(& &1.writable?)
|
|> Enum.filter(& &1.writable?)
|
||||||
|> Enum.map(fn attribute ->
|
|> Enum.map(fn attribute ->
|
||||||
allow_nil? =
|
allow_nil? =
|
||||||
attribute.allow_nil? || attribute.default || type == :update || attribute.generated? ||
|
attribute.allow_nil? || attribute.default != nil || type == :update || attribute.generated? ||
|
||||||
(type == :create && attribute.name in action.allow_nil_input)
|
(type == :create && attribute.name in action.allow_nil_input)
|
||||||
|
|
||||||
explicitly_required = attribute.name in action.require_attributes
|
explicitly_required = attribute.name in action.require_attributes
|
||||||
|
|
Loading…
Reference in a new issue