fix: compare ext with leading '.' (#7458)

This allows an exception to be raised if submission
files are missing, leading to a server error. That's
not pretty, but is better than ignoring the fail.
This commit is contained in:
Jennifer Richards 2024-05-24 11:29:42 -03:00 committed by GitHub
parent 7f00d75643
commit a1a30974ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -661,7 +661,7 @@ def move_files_to_repository(submission):
os.link(dest, ftp_dest)
elif dest.exists():
log.log("Intended to move '%s' to '%s', but found source missing while destination exists.")
elif ext in submission.file_types.split(','):
elif f".{ext}" in submission.file_types.split(','):
raise ValueError("Intended to move '%s' to '%s', but found source and destination missing.")