From 989a4d3165cd74402c8fbb26941aa0f09460485b Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 2 May 2024 15:55:42 -0700 Subject: [PATCH] fix --- backend/apps/images/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/apps/images/main.py b/backend/apps/images/main.py index e43d249fce..eeaa2b4018 100644 --- a/backend/apps/images/main.py +++ b/backend/apps/images/main.py @@ -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) @@ -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)