You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class UserSerializer(UniqueFieldsMixin, serializers.ModelSerializer):
class Meta:
model = User
fields = ("username", "email", "first_name", "last_name")
class OrganizationSerializer(WritableNestedModelSerializer):
user = UserSerializer(source="owner.organization_user.user")
class Meta:
model = Organization
fields = ("name", "user")
I have serializer like this. The user in Organization is a very deep relation. Getting error
Cannot assign "{'organization_user': {'user': OrderedDict([('username', 'username'), ('email', 'test@test.com'), ('first_name', 'Test'), ('last_name', 'Test')])}}": "Organization.owner" must be a "OrganizationOwner" instance.
The text was updated successfully, but these errors were encountered:
I have serializer like this. The user in Organization is a very deep relation. Getting error
The text was updated successfully, but these errors were encountered: