Fix transaction user attribute
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
All checks were successful
ci/woodpecker/push/docker Pipeline was successful
This commit is contained in:
parent
332bdc00d7
commit
9041c922f7
|
@ -176,7 +176,7 @@ class ChargePoint(cp):
|
|||
)
|
||||
if "id_token" in kwargs.keys():
|
||||
if id_token_info.status == AuthorizationStatusType.accepted:
|
||||
transaction.user_id = UUID(token_owner_id)
|
||||
transaction.user_id = token_owner_id
|
||||
db.add(transaction)
|
||||
elif event_type == str(TransactionEventType.updated):
|
||||
transaction = db.get(DbTransaction, transaction_info["transaction_id"])
|
||||
|
@ -202,7 +202,7 @@ class ChargePoint(cp):
|
|||
db.add(db_meter_value)
|
||||
if "id_token" in kwargs.keys():
|
||||
if id_token_info.status == AuthorizationStatusType.accepted:
|
||||
transaction.user_id = UUID(token_owner_id)
|
||||
transaction.user_id = token_owner_id
|
||||
elif event_type == str(TransactionEventType.ended):
|
||||
transaction = db.get(DbTransaction, transaction_info["transaction_id"])
|
||||
transaction.status = TransactionStatus.ENDED
|
||||
|
@ -220,7 +220,7 @@ class ChargePoint(cp):
|
|||
transaction.meter_end = meter_end
|
||||
if "id_token" in kwargs.keys():
|
||||
if id_token_info.status == AuthorizationStatusType.accepted:
|
||||
transaction.user_id = UUID(token_owner_id)
|
||||
transaction.user_id = token_owner_id
|
||||
db.commit()
|
||||
|
||||
if "id_token" in kwargs.keys():
|
||||
|
|
Loading…
Reference in a new issue