Skip to content

Commit

Permalink
Add Application ID
Browse files Browse the repository at this point in the history
  • Loading branch information
aapris committed Nov 1, 2024
1 parent ef3ab9d commit 6dcdac9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
[0, "Ethics", "Ethical Considerations"],
[0, "I accept storing of personal information", "Accept Storing Personal Information"],
[0, "Data security policy", "Data Security Policy"],
[0, "Application ID", "Application ID"],
[4, "Application ID", "Application ID"],
[0, "Submit date and time", "Submission Time"],
[0, "Valid", "Valid"],
]
Expand All @@ -90,6 +90,8 @@ def get_application_round_from_challenge_name(challenge_name: str) -> Applicatio
# first filter 3rd round ApplicationRounds
ars = ApplicationRound.objects.filter(name__startswith="CC-3")
# in the database titles are like "CC-310: How to do foo bar?", name should exist there as is
# Remove multiple spaces from name
name = " ".join(name.split())
ars = ars.filter(name__contains=name)
if len(ars) != 1:
print(f"ApplicationRound not found for {challenge_name}")
Expand Down Expand Up @@ -198,6 +200,7 @@ def handle(self, *args, **options):
# If there is, import all files from that directory as attachments
if options["attachments_dir"]:
dirname = Path(options["attachments_dir"]) / Path(a["Application ID"])
print(dirname)
for subdir in glob.glob(f"{dirname}/*"):
import_attachments(app, subdir)
attachment_cnt += 1
Expand Down

0 comments on commit 6dcdac9

Please sign in to comment.