django-ninja
django-ninja copied to clipboard
Schema class | value is not a valid enumeration member; permitted: ...
If I try something like this:
class NoteSchema(Schema):
...
visibility: Optional[Note.NoteVisibilityTypes]
...
class Note(BaseModel):
class NoteVisibilityTypes(models.IntegerChoices):
PUBLIC= 1
PRIVATE= 2
Then it gives me an error saying:
Hi @maifeeulasad
Could you share more of your code ?
- what is BaseModel ?
- how you defined your view function ?