diff --git a/sdx_controller/utils/db_utils.py b/sdx_controller/utils/db_utils.py index cf2c742b..4396770e 100644 --- a/sdx_controller/utils/db_utils.py +++ b/sdx_controller/utils/db_utils.py @@ -60,7 +60,7 @@ def read_from_db(self, collection, key): def get_all_entries_in_collection(self, collection): db_collection = self.sdxdb[collection] # MongoDB has an ObjectId for each item, so need to exclude the ObjectIds - all_entries = db_collection.find({}, {"_id": 0}) + all_entries = db_collection.find({"deleted": {"$ne": True}}, {"_id": 0}) return all_entries def mark_deleted(self, collection, key):