We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea6d6bb commit e6acba1Copy full SHA for e6acba1
1 file changed
src/spaceone/core/transaction.py
@@ -134,5 +134,7 @@ def delete_transaction() -> None:
134
if transaction := get_transaction(is_create=False):
135
if hasattr(LOCAL_STORAGE, transaction.id):
136
delattr(LOCAL_STORAGE, transaction.id)
137
- elif hasattr(LOCAL_STORAGE, transaction.thread_id):
138
- delattr(LOCAL_STORAGE, transaction.thread_id)
+
+ thread_id = str(threading.current_thread().ident)
139
+ if hasattr(LOCAL_STORAGE, thread_id):
140
+ delattr(LOCAL_STORAGE, thread_id)
0 commit comments