-
Notifications
You must be signed in to change notification settings - Fork 110
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
Conversation
fb9e6ad
to
eb0514e
Compare
Attached issue: https://pulp.plan.io/issues/7836 |
ea18d8d
to
d0d47c7
Compare
pulpcore/app/modelresource.py
Outdated
if row["sha384"] == "": | ||
row["sha384"] = None | ||
if row["sha512"] == "": | ||
row["sha512"] = None |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
d0d47c7
to
a6dcb44
Compare
pulpcore/app/modelresource.py
Outdated
|
||
def before_import_row(self, row, **kwargs): | ||
""" | ||
Sets sha384 and sha512 to None if they are blank strings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sets sha384 and sha512 to None if they are blank strings. | |
Sets digests to None if they are blank strings. |
a6dcb44
to
d3aa9d7
Compare
d3aa9d7
to
66e29fb
Compare
fixes #7836
Please be sure you have read our documentation on creating PRs:
https://docs.pulpproject.org/contributing/pull-request-walkthrough.html