Start _cached_sql_tables as None, and in the SQL mixin.
This commit is contained in:
parent
35895856e6
commit
5dffe52830
1 changed files with 3 additions and 2 deletions
|
@ -677,8 +677,11 @@ class PDBSQLMixin:
|
||||||
self.on_commit_queue = []
|
self.on_commit_queue = []
|
||||||
self.on_rollback_queue = []
|
self.on_rollback_queue = []
|
||||||
self.savepoints = []
|
self.savepoints = []
|
||||||
|
self._cached_sql_tables = None
|
||||||
|
|
||||||
def assert_table_exists(self, table):
|
def assert_table_exists(self, table):
|
||||||
|
if not self._cached_sql_tables:
|
||||||
|
self._cached_sql_tables = self.get_sql_tables()
|
||||||
if table not in self._cached_sql_tables:
|
if table not in self._cached_sql_tables:
|
||||||
raise exceptions.BadTable(table)
|
raise exceptions.BadTable(table)
|
||||||
|
|
||||||
|
@ -1390,8 +1393,6 @@ class PhotoDB(
|
||||||
self.log.setLevel(self.config['log_level'])
|
self.log.setLevel(self.config['log_level'])
|
||||||
|
|
||||||
# OTHER
|
# OTHER
|
||||||
self._cached_sql_tables = self.get_sql_tables()
|
|
||||||
|
|
||||||
self._cached_frozen_children = None
|
self._cached_frozen_children = None
|
||||||
|
|
||||||
self.caches = {
|
self.caches = {
|
||||||
|
|
Loading…
Reference in a new issue