Skip to content

Commit

Permalink
Fix a serialization issue
Browse files Browse the repository at this point in the history
Our data model allows null sum_types, but createrepo_c types don't
allow setting such values. It defaults to a value of 0, or "unknown"

[noissue]
  • Loading branch information
dralley committed Feb 8, 2024
1 parent 4129dfc commit b0776e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pulp_rpm/app/models/advisory.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,7 @@ def to_createrepo_c(self):
# If self.sum_type is 0 the result will be createrepo_c printing "Unknown checksum",
# an invalid value, thus we don't want to set self.sum if this will happen.
pkg.sum = self.sum
if self.sum_type:
pkg.sum_type = self.sum_type

return pkg
Expand Down

0 comments on commit b0776e8

Please sign in to comment.