Skip to content

Commit ae9c9a0

Browse files
committed
make sure there is at least 1 file ref
1 parent b7e3356 commit ae9c9a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def run_mmm_async():
234234
logging.debug("run_mmm_async request data: %s", data)
235235

236236
logging.info("checking that the data has file_refs: %s", data)
237-
if "openaiFileIdRefs" not in data: # TODO: do a more thorough schema check here
237+
if ("openaiFileIdRefs" not in data) or (len(data["openaiFileIdRefs"]) == 0): # TODO: do a more thorough schema check here
238238
logging.error("Data does not have openaiFileIdRefs")
239239
return jsonify({"error": "Request must include openaiFileIdRefs"}), 400
240240
else:

0 commit comments

Comments
 (0)