Skip to content
Snippets Groups Projects
Unverified Commit c3aac0e8 authored by Katleho Madisa's avatar Katleho Madisa
Browse files

SAR-149 Ensure message logged only when new transaction ID is generated.

parent 199509b6
Branches
Tags
No related merge requests found
......@@ -76,7 +76,6 @@ class Transaction:
if not self._transaction_id:
self._transaction_id = self._get_from_params_or_generate_new_id()
self.logger.info(f"Generated transaction ID {self._transaction_id}")
if transaction_id and params.get(self._transaction_id_key):
self.logger.info(
......@@ -113,6 +112,7 @@ class Transaction:
transaction_id = self._params.get(self._transaction_id_key)
if not self._is_valid_id(transaction_id):
transaction_id = self._generate_new_id()
self.logger.info(f"Generated transaction ID {transaction_id}")
return transaction_id
def _is_valid_id(self, transaction_id):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment