OP-3426 - fix not dropping settings collection

This commit is contained in:
Petr Kalis 2022-10-14 17:13:49 +02:00
parent 5ee97fa8e2
commit be51b3d977

View file

@ -118,9 +118,8 @@ class DBHandler:
"Run with overwrite=True")
else:
if collection:
coll = self.client[db_name_out].get(collection)
if coll:
coll.drop()
if collection in self.client[db_name_out].list_collection_names():
self.client[db_name_out][collection].drop()
else:
self.teardown(db_name_out)