Skip to content

Commit f85b194

Browse files
committed
Ensures we await committing after creating the table but before adding the trigger.
1 parent 3bfa833 commit f85b194

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

async_substrate_interface/utils/cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ async def _create_if_not_exists(self, chain: str, table_name: str):
6161
);
6262
"""
6363
)
64+
await self._db.commit()
6465
await self._db.execute(
6566
f"""
6667
CREATE TRIGGER IF NOT EXISTS prune_rows_trigger_{table_name} AFTER INSERT ON {table_name}

0 commit comments

Comments
 (0)