Fix wrong call

This commit is contained in:
Michal Kunc 2021-11-24 14:31:05 +01:00
parent d0e9d6913d
commit e5c7d0c852
Signed by: michal
GPG Key ID: 4CA5FB6559E0BDF8

View File

@ -32,7 +32,7 @@ def main():
# mongo[DB][COLLECTION].insert_many(items)
with mongo.start_session() as s:
s.start_transaction()
s[DB].drop_database()
mongo[DB].drop_database()
for collection in collections:
print(f"Inserting collection: {collection}")
mongo[DB][collection].insert_many(collections[collection])