From a1a30974ea0074a78648e6f74b4a8e0c4ee87a95 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Fri, 24 May 2024 11:29:42 -0300 Subject: [PATCH] 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. --- ietf/submit/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/submit/utils.py b/ietf/submit/utils.py index a19c42ecf..770352b4c 100644 --- a/ietf/submit/utils.py +++ b/ietf/submit/utils.py @@ -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.")