Check if another file has been uploaded with the same blake2 digest#2928
Closed
alanbato wants to merge 1 commit intopypi:masterfrom
Closed
Check if another file has been uploaded with the same blake2 digest#2928alanbato wants to merge 1 commit intopypi:masterfrom
alanbato wants to merge 1 commit intopypi:masterfrom
Conversation
Member
|
The error is because your test is getting to this line: request.db.add(
JournalEntry(
name=release.project.name,
version=release.version,
action="add {python_version} file {filename}".format(
python_version=file_.python_version,
filename=file_.filename,
),
> submitted_by=request.user,
submitted_from=request.remote_addr,
),
)Which means it's trying to add the file being uploaded, so it seems like either something is wrong with your test, or with the new logic you added. |
Member
|
Hey @alanbato, need any help or more direction here? |
Contributor
|
I think @alanbato is having computer problems. |
Contributor
Author
|
Yes I am 😢 |
Contributor
|
Thanks for all your work on this @alanbato which @yeraydiazdiaz was able to build on. Hope your computer heals soon! |
Contributor
Author
|
@brainwane I'm glad it was of help :) And my computer lives to see another, so I'm ready to start contributing again! 😎 |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This tries to resolve #2490
I'm not sure if the uniqueness of the blake2 digest should be validated on file uploading or before, or if hijacking on the same "File already exists" message is helpful enough.
Also, I'm getting a weird error on my test, making it fail. Something about the request object missing a 'user' attribute.
Thanks for your feedback y'all.
🐍