parent: [ 'Invalid pk "0" - object does not exist.' ]

87 views
Skip to first unread message

L K Singh

unread,
May 31, 2016, 8:26:41 AM5/31/16
to Django developers (Contributions to Django itself)
class AccountTypeSerializer(serializers.ModelSerializer):
parent = serializers.PrimaryKeyRelatedField(queryset=AccountType.objects.all(), required=False)
class Meta:
model = AccountType
fields = ('id','parent','account_type_name')

Tim Graham

unread,
May 31, 2016, 9:22:18 AM5/31/16
to Django developers (Contributions to Django itself)
Sorry, but this post without any explanation doesn't help much.

For usage questions, please use the django-users mailing list. To report bugs, use https://code.djangoproject.com/.
Reply all
Reply to author
Forward
0 new messages