diff --git a/content/uploads/__init__.py b/content/uploads/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/services/mocks/initial.py b/src/services/mocks/initial.py index c7f4cbf8..ea443c1d 100644 --- a/src/services/mocks/initial.py +++ b/src/services/mocks/initial.py @@ -184,11 +184,12 @@ async def create_initial_data(request: Request): name_in_disk = f"test_mock{course_id}.jpeg" image = requests.get( - "https://source.unsplash.com/random/800x600") + "https://source.unsplash.com/random/800x600/?img=1") # check if folder exists and create it if not - if not os.path.exists("content/uploads/img"): - os.makedirs("content/uploads/img") + if not os.path.exists(f"content/uploads/img"): + + os.makedirs(f"content/uploads/img") with open(f"content/uploads/img/{name_in_disk}", "wb") as f: f.write(image.content)