Skip to content

Commit 8b54c96

Browse files
committed
Fix transaction id format
1 parent c0ec51e commit 8b54c96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

simulate_events.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def generate_random_transaction(transaction_id):
1616
statuses = ["approved", "declined"]
1717

1818
transaction = {
19-
"transaction_id": f"{datetime.now().strftime('%Y%m%d%H%M%S')}{transaction_id:05}", # Combination of timestamp and incrementing number
19+
"transaction_id": f"T{datetime.now().strftime('%Y%m%d%H%M%S')}{transaction_id:05}", # Combination of timestamp and incrementing number
2020
"user_id": random.choice(user_ids),
2121
"timestamp": (datetime.utcnow() - timedelta(seconds=random.randint(0, 3600))).isoformat() + 'Z',
2222
"amount": round(random.uniform(1.0, 1000.0), 2),

0 commit comments

Comments
 (0)