sql.generic.SqlDatabase: raise an error when no tables specified

This commit is contained in:
Izalia Mae 2021-09-15 08:37:41 -04:00
parent 24ae540ea5
commit 56e3e30db1

View file

@ -97,6 +97,9 @@ class SqlDatabase:
def create_tables(self, *tables):
if not tables:
raise ValueError('No tables specified')
new_tables = [self.table[table] for table in tables]
self.table.meta.create_all(bind=self.db, tables=new_tables)