Skip to content

Commit

Permalink
Pass allow_null to UUID pk_field
Browse files Browse the repository at this point in the history
— Still fails
  • Loading branch information
Carlton Gibson committed Feb 10, 2016
1 parent 944a121 commit 1fe563f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_relations_pk.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ class Meta:
# Nullable UUIDForeignKey
class NullableUUIDForeignKeySourceSerializer(serializers.ModelSerializer):
target = serializers.PrimaryKeyRelatedField(
pk_field=serializers.UUIDField(),
queryset=UUIDForeignKeyTarget.objects.all(),
allow_empty=True)
pk_field=serializers.UUIDField(allow_null=True),
queryset=UUIDForeignKeyTarget.objects.all())

class Meta:
model = NullableUUIDForeignKeySource
Expand Down

0 comments on commit 1fe563f

Please sign in to comment.