-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TILA-776 | Resource mutations and query changes #272
Conversation
is_draft describes whether the resource is still being edited and should not be displayed to end users TILA-776
TILA-776
TILA-776
TILA-776
|
||
|
||
class ResourceCreateSerializer(ResourceSerializer, PrimaryKeySerializer): | ||
location_type = serializers.CharField( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be ChoiceField, might get better validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got some weird error if this was ChoiceField
(or was not redefined at all): AssertionError: Found different types with the same name in the schema: location_type, location_type.
But your comment in mind => have to write validation check for location type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it might be a bug with having type in field name 😮
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this with changing the model name (migrations and all) to not contain type but it still nagged about it. It could be something related with ChoiceField
go and tell 🤷
Anyhow I added the validations for the infamous location_type
No description provided.