prepare_connection() now takes datasette and database args, refs #678

This commit is contained in:
Simon Willison 2020-02-21 17:32:40 -08:00
commit 6303ea5048
5 changed files with 16 additions and 8 deletions

View file

@ -58,7 +58,7 @@ class Database:
conn = getattr(connections, self.name, None)
if not conn:
conn = self.connect()
self.ds.prepare_connection(conn)
self.ds.prepare_connection(conn, self.name)
setattr(connections, self.name, conn)
return fn(conn)