8000 Nullable fields not being handled correctly. · Issue #105 · gjaldon/ecto_enum · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Nullable fields not being handled correctly. #105
Open
@sdost

Description

@sdost

In our MySQL table the enum field is nullable by default. When the nil is received from a query, it is passed into the load/1 function, which is only expecting the values of the enum, and does not handle a nil value.

Request: POST /graphql
** (exit) an exception was raised:
    ** (FunctionClauseError) no function clause matching in BusinessType.load/1
        (emporos) lib/emporos/models/stripe/business_type.ex:3: BusinessType.load(nil)

I would expect that the nil should just get passed through to nil from the load/1 function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0