forked from p15670423/monkey
quick bugfix to not try and drop system collections
This commit is contained in:
parent
1a3ca06ce8
commit
6caec5ccf2
|
@ -36,7 +36,8 @@ class Root(flask_restful.Resource):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def reset_db():
|
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()
|
ConfigService.init_config()
|
||||||
return jsonify(status='OK')
|
return jsonify(status='OK')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue