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

Fix import/export bug when sha384 or sha512 are null #1054

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

daviddavis
Copy link
Contributor

fixes #7836

Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/contributing/pull-request-walkthrough.html

@pulpbot
Copy link
Member

pulpbot commented Dec 10, 2020

Attached issue: https://pulp.plan.io/issues/7836

@daviddavis daviddavis force-pushed the issue7836 branch 2 times, most recently from ea18d8d to d0d47c7 Compare December 10, 2020 15:25
if row["sha384"] == "":
row["sha384"] = None
if row["sha512"] == "":
row["sha512"] = None
Copy link
Member

Choose a reason for hiding this comment

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

Should we not do it for all digests for consistency?

Copy link
Contributor Author

@daviddavis daviddavis Dec 10, 2020

Choose a reason for hiding this comment

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

It's not necessary since the other checksums aren't unique. But we could do it for other checksums--I don't think it would hurt.

Copy link
Member

Choose a reason for hiding this comment

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

It feels weird to do something with only a subset of those otherwise very symmetric digests.


def before_import_row(self, row, **kwargs):
"""
Sets sha384 and sha512 to None if they are blank strings.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Sets sha384 and sha512 to None if they are blank strings.
Sets digests to None if they are blank strings.

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.

None yet

4 participants