Skip to content

Commit

Permalink
Dojos: Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorNelson committed Jan 24, 2024
1 parent 8397846 commit f585d5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dojo_plugin/api/v1/dojo.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def post(self):
private_key = data.get("private_key", "").replace("\r\n", "\n")

key = f"rl:{get_ip()}:{request.endpoint}"
timeout = datetime.timedelta(days=1).total_seconds()
timeout = int(datetime.timedelta(days=1).total_seconds())

if not is_admin() and cache.get(key) is not None:
return {"success": False, "error": "You can only create 1 dojo per day."}, 429
Expand Down

0 comments on commit f585d5c

Please sign in to comment.