mirror of
https://github.com/simple-login/app.git
synced 2024-11-10 21:27:10 +01:00
fix: coinbase float user id (#2149)
This commit is contained in:
parent
ae9f47d5a5
commit
87e55605b8
@ -702,7 +702,12 @@ def setup_coinbase_commerce(app):
|
|||||||
|
|
||||||
|
|
||||||
def handle_coinbase_event(event) -> bool:
|
def handle_coinbase_event(event) -> bool:
|
||||||
user_id = int(event["data"]["metadata"]["user_id"])
|
server_user_id = event["data"]["metadata"]["user_id"]
|
||||||
|
try:
|
||||||
|
user_id = int(server_user_id)
|
||||||
|
except ValueError:
|
||||||
|
user_id = int(float(server_user_id))
|
||||||
|
|
||||||
code = event["data"]["code"]
|
code = event["data"]["code"]
|
||||||
user = User.get(user_id)
|
user = User.get(user_id)
|
||||||
if not user:
|
if not user:
|
||||||
|
Loading…
Reference in New Issue
Block a user