diff --git a/app/ocpp_proto/chargepoint.py b/app/ocpp_proto/chargepoint.py index c529f42..d41b857 100644 --- a/app/ocpp_proto/chargepoint.py +++ b/app/ocpp_proto/chargepoint.py @@ -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():