quick bugfix to not try and drop system collections

This commit is contained in:
Itay Mizeretz 2018-03-10 18:24:58 +02:00
parent 1a3ca06ce8
commit 6caec5ccf2
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ class Root(flask_restful.Resource):
@staticmethod
def reset_db():
[mongo.db[x].drop() for x in mongo.db.collection_names()]
# We can't drop system collections.
[mongo.db[x].drop() for x in mongo.db.collection_names() if not x.startswith('system.')]
ConfigService.init_config()
return jsonify(status='OK')