Skip to content

Commit

Permalink
fix seeder path
Browse files Browse the repository at this point in the history
  • Loading branch information
warreprovoost committed May 23, 2024
1 parent d3bcf1f commit ca5f270
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/seeder/seeder.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def populate_course_projects(session, course_id, students):
# Write assignment.md file
assignment_content = fake.text()
assignment_file_path = os.path.join(
UPLOAD_URL, "projects", str(project_id), "assignment.md")
UPLOAD_URL, str(project_id), "assignment.md")
os.makedirs(os.path.dirname(assignment_file_path), exist_ok=True)
with open(assignment_file_path, "w", encoding="utf-8") as assignment_file:
assignment_file.write(assignment_content)
Expand All @@ -236,7 +236,7 @@ def populate_project_submissions(session, students, project_id):
session.add_all(submissions)
session.commit()
for submission in submissions:
submission_directory = os.path.join(UPLOAD_URL, "projects", str(
submission_directory = os.path.join(UPLOAD_URL, str(
project_id), "submissions", str(submission.submission_id), "submission")
os.makedirs(submission_directory, exist_ok=True)
submission_file_path = os.path.join(
Expand Down

0 comments on commit ca5f270

Please sign in to comment.