Skip to content

Commit

Permalink
Fix validation for top-level Variant UIDs with dashes
Browse files Browse the repository at this point in the history
Dash (-) is removed from variant.id in this case.

See https://pagure.io/pungi/c/f0aecf6744816751d9511c4f6e9347c6c7eaeb26?branch=master
959e534

JIRA: RHELCMP-127
  • Loading branch information
hlin authored and lubomir committed Apr 9, 2020
1 parent 4a2a36c commit d259d09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions productmd/composeinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ def __len__(self):
def _validate_variants(self):
for variant_id in self:
variant = self[variant_id]
if variant.parent is None and '-' in variant_id:
variant_id = variant_id.replace("-", "")
if variant.id != variant_id:
raise ValueError("Variant ID doesn't match: '%s' vs '%s'" % (variant.id, variant_id))

Expand Down

0 comments on commit d259d09

Please sign in to comment.