Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tjbck committed May 2, 2024
1 parent 482f010 commit 989a4d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/apps/images/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def generate_image(
for image in res["data"]:
image_filename = save_b64_image(image["b64_json"])
images.append({"url": f"/cache/image/generations/{image_filename}"})
file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_id}.json")
file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_filename}.json")

with open(file_body_path, "w") as f:
json.dump(data, f)
Expand Down Expand Up @@ -477,7 +477,7 @@ def generate_image(
for image in res["images"]:
image_filename = save_b64_image(image)
images.append({"url": f"/cache/image/generations/{image_filename}"})
file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_id}.json")
file_body_path = IMAGE_CACHE_DIR.joinpath(f"{image_filename}.json")

with open(file_body_path, "w") as f:
json.dump({**data, "info": res["info"]}, f)
Expand Down

0 comments on commit 989a4d3

Please sign in to comment.