Surn commited on
Commit
b25b7fc
·
1 Parent(s): 0fd9c55

Fix user_history image error

Browse files
Files changed (1) hide show
  1. modules/user_history.py +1 -1
modules/user_history.py CHANGED
@@ -177,7 +177,7 @@ def save_image(
177
  metadata = {}
178
  if "datetime" not in metadata:
179
  metadata["datetime"] = str(datetime.now())
180
- data = {"path": str(image_path), "label": label, "metadata": metadata}
181
  with user_history._user_lock(username):
182
  with user_history._user_jsonl_path(username).open("a") as f:
183
  f.write(json.dumps(data) + "\n")
 
177
  metadata = {}
178
  if "datetime" not in metadata:
179
  metadata["datetime"] = str(datetime.now())
180
+ data = {"image_path": str(image_path), "label": label, "metadata": metadata}
181
  with user_history._user_lock(username):
182
  with user_history._user_jsonl_path(username).open("a") as f:
183
  f.write(json.dumps(data) + "\n")