Skip to content

Commit

Permalink
Allow the unique ID to be a UUID instead of an int
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Apr 10, 2023
1 parent 587d4dc commit 32d39fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ def post_rpc_endpoint():
# We save/get requests data since it also has the id of said requests from json RPC.

modified_data = dict(REQ_DATA)
original_req_id = int(dict(REQ_DATA).get("id", 0))

# This could also be a UUID
original_req_id = dict(REQ_DATA).get("id", 0)

# we set the save key as -1 id since that is not real. This way on requests we are forced to change it back to the original requests
# this ensures we cache things such as status independent of the requested id.
Expand Down

0 comments on commit 32d39fc

Please sign in to comment.