Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore release version and description if null #960

Closed
wants to merge 1 commit into from

Conversation

daviddavis
Copy link
Contributor

Passing release version or description to python-deb fails if the fields are None.

fixes #959

Passing release version or description to python-deb fails if the fields
are None.

fixes pulp#959
@@ -415,15 +415,15 @@ def __init__(
self.release["Label"] = release.label
if release.suite:
self.release["Suite"] = release.suite
if release.version != NULL_VALUE:
if release.version and release.version != NULL_VALUE:
Copy link
Collaborator

@quba42 quba42 Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea is that this can't be null: https://github.com/pulp/pulp_deb/blob/main/pulp_deb/app/models/content/metadata.py#L27 because we did not set null=True for the field definition. Resulting in this DB migration: https://github.com/pulp/pulp_deb/blob/main/pulp_deb/app/migrations/0024_add_release_fields.py which should have defaulted the field to the string '__!!!NULL VALUE!!!__'.

I am guessing this is another case of your instance having added this field with a different migration than the one that was eventually merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed. Thanks for the insight.

@daviddavis daviddavis closed this Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish fails if release version or description are None
2 participants