Skip to content

Commit

Permalink
Merge pull request #1168 from ATIX-AG/plain_component
Browse files Browse the repository at this point in the history
Expose the plain component to API querries
  • Loading branch information
quba42 authored Oct 9, 2024
2 parents d98e115 + 5583881 commit 35dfe06
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES/1167.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Exposed the plain component when retrieving ReleaseComponent content via the API.
4 changes: 4 additions & 0 deletions pulp_deb/app/serializers/content_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,12 +856,16 @@ def retrieve(self, validated_data):

component = CharField(help_text="Name of the component.")
distribution = CharField(help_text="Name of the distribution.")
plain_component = CharField(
help_text="Name of the component without any path prefixes.", read_only=True
)

class Meta(NoArtifactContentSerializer.Meta):
model = ReleaseComponent
fields = NoArtifactContentSerializer.Meta.fields + (
"component",
"distribution",
"plain_component",
)


Expand Down

0 comments on commit 35dfe06

Please sign in to comment.