Skip to content

Commit

Permalink
files: fix typo in filename method
Browse files Browse the repository at this point in the history
Signed-off-by: pamfilos <[email protected]>
  • Loading branch information
pamfilos committed Apr 25, 2024
1 parent 3af17a8 commit 50ba8fb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dags/common/scoap3_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@
FILE_EXTENSIONS = {
"pdf": ".pdf",
"xml": ".xml",
"pdfa": ".a_2b.pdf"
"pdfa": ".pdf"
}

def update_filename_extension(filename, type):
extension = FILE_EXTENSIONS.get(type, "")
if filename.endsWith(extension):
if filename.endswith(extension):
return filename
elif extension:
if type == "pdfa":
extension = f".a-2b.pdf"
return f"{filename}{extension}"

class Scoap3Repository(IRepository):
Expand Down

0 comments on commit 50ba8fb

Please sign in to comment.