Skip to content

Commit

Permalink
Add retrieve functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
quba42 committed Feb 19, 2024
1 parent c3680f2 commit 533c865
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pulp_deb/app/serializers/content_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,12 @@ class ReleaseComponentSerializer(NoArtifactContentSerializer):
A Serializer for ReleaseComponent.
"""

def retrieve(self, validated_data):
return ReleaseComponent.objects.filter(
distribution=validated_data["distribution"],
component=validated_data["component"],
).first()

component = CharField(help_text="Name of the component.")
distribution = CharField(help_text="Name of the distribution.")

Expand Down

0 comments on commit 533c865

Please sign in to comment.