Skip to content

Enum cannot represent value #375

@n00el

Description

@n00el

I have the following sqlalchemy model:

class AccommodationModel(Base):
	__tablename__ = "accommodations"

	....
	status = Column(Enum(AccommodationStatus), nullable=False, default=AccommodationStatus.creating)

And the following graphene model:

class AccommodationGraphQL(SQLAlchemyObjectType):
	class Meta:
		model = AccommodationModel

And I got the following error when selecting the status field from the query:

Enum 'AccommodationStatus' cannot represent value: <AccommodationStatus.active: 'creating'>

Metadata

Metadata

Assignees

No one assigned

    Labels

    👀 more info neededneeds-replyIssue needs reply from author. Will be closed automatically after 4 weeks without response.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions