Skip to content

Commit

Permalink
Correct serializer fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dralley committed Jul 6, 2018
1 parent 6c158b0 commit e154ef9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pulp_python/app/serializers.py
Expand Up @@ -223,8 +223,7 @@ def create(self, validated_data):
return PythonPackageContent

class Meta:
fields = (
'_href', 'created', 'type',
fields = tuple(set(core_serializers.ContentSerializer.Meta.fields) - {'artifacts'}) + (
'filename', 'packagetype', 'name', 'version', 'metadata_version', 'summary',
'description', 'keywords', 'home_page', 'download_url', 'author', 'author_email',
'maintainer', 'maintainer_email', 'license', 'requires_python', 'project_url',
Expand All @@ -240,8 +239,8 @@ class MinimalPythonPackageContentSerializer(PythonPackageContentSerializer):
"""

class Meta:
fields = core_serializers.ContentSerializer.Meta.fields + (
'filename', 'packagetype', 'name', 'version'
fields = tuple(set(core_serializers.ContentSerializer.Meta.fields) - {'artifacts'}) + (
'filename', 'packagetype', 'name', 'version', 'artifact'
)
model = python_models.PythonPackageContent

Expand Down

0 comments on commit e154ef9

Please sign in to comment.