Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Allowing publication to be unset on distributions
Browse files Browse the repository at this point in the history
The problem is you can create distributions without publications but you
can't unset a publication on a distribution once it is set.

fixes #3671
https://pulp.plan.io/issues/3671
  • Loading branch information
David Davis authored and daviddavis committed May 16, 2018
1 parent 7785448 commit 902aff6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pulpcore/pulpcore/app/serializers/repository.py
Expand Up @@ -211,7 +211,8 @@ class DistributionSerializer(ModelSerializer):
required=False,
help_text=_('The publication being served as defined by this distribution'),
queryset=models.Publication.objects.exclude(complete=False),
view_name='publications-detail'
view_name='publications-detail',
allow_null=True
)
repository = serializers.HyperlinkedRelatedField(
required=False,
Expand Down

0 comments on commit 902aff6

Please sign in to comment.