fix SqlSession.drop_table
This commit is contained in:
parent
02bd0243dd
commit
1b296026c6
|
@ -265,10 +265,10 @@ class SqlSession(object):
|
|||
|
||||
|
||||
def drop_table(self, name):
|
||||
if name not in self.table:
|
||||
if name not in self.get_tables():
|
||||
raise KeyError(f'Table does not exist: {name}')
|
||||
|
||||
self.execute(f'DROP TABLE {table}')
|
||||
self.execute(f'DROP TABLE {name}')
|
||||
|
||||
|
||||
def drop_tables(self):
|
||||
|
|
Loading…
Reference in a new issue