yym68686 commited on
Commit
a20c06f
·
1 Parent(s): c084ed1

🐛 Bug: Fix the bug in the moral check database update error.

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -429,7 +429,7 @@ class StatsMiddleware(BaseHTTPMiddleware):
429
  process_time = time() - start_time
430
  current_info["process_time"] = process_time
431
  current_info["is_flagged"] = is_flagged
432
- await self.update_stats(current_info)
433
  return JSONResponse(
434
  status_code=400,
435
  content={"error": "Content did not pass the moral check, please modify and try again."}
 
429
  process_time = time() - start_time
430
  current_info["process_time"] = process_time
431
  current_info["is_flagged"] = is_flagged
432
+ await update_stats(current_info)
433
  return JSONResponse(
434
  status_code=400,
435
  content={"error": "Content did not pass the moral check, please modify and try again."}