We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I use NestedField (with accept_pk_only) on DynamicFieldsMixin and i get this result: 'int' object has no attribute 'get'
'int' object has no attribute 'get'
Can you help me to solve this problem?
The text was updated successfully, but these errors were encountered:
Hi, I use NestedField (with accept_pk_only) on DynamicFieldsMixin and i get this result: 'int' object has no attribute 'get' Can you help me to solve this problem?
Posting a segment of code with a problem would be helpful to someone who wants to help.
Sorry, something went wrong.
I just want
class TicketingSerializer(DynamicFieldsMixin): shift = CartAppSerializer.ShiftSerializer(read_only=True,allow_null=True, required=False) shift_id = PKR(queryset=CartAppSerializer.Shift.objects.all(), source="shift", allow_null=True, required=False)
To
class TicketingSerializer(DynamicFieldsMixin): shift = NestedField(ShiftSerializer, accept_pk_only=True)
For example : send request:
{ name:"new ticket" shift:1 }
in response: 'int' object has no attribute 'get'
Try adding NestedModelSerializer to the serializer definition like this:
from django_restql.serializers import NestedModelSerializer class TicketingSerializer(DynamicFieldsMixin, NestedModelSerializer):
If you get the same error, post the entire error trace.
No branches or pull requests
Hi,
I use NestedField (with accept_pk_only) on DynamicFieldsMixin and i get this result:
'int' object has no attribute 'get'
Can you help me to solve this problem?
The text was updated successfully, but these errors were encountered: