forked from p15670423/monkey
Island; Remove disused IslandMode mongo document
This commit is contained in:
parent
f78fa73563
commit
410401a319
|
@ -1,7 +0,0 @@
|
|||
from mongoengine import Document, StringField
|
||||
|
||||
|
||||
class IslandMode(Document):
|
||||
COLLECTION_NAME = "island_mode"
|
||||
|
||||
mode = StringField()
|
|
@ -6,7 +6,6 @@ from monkey_island.cc.database import mongo
|
|||
from monkey_island.cc.models import Config
|
||||
from monkey_island.cc.models.agent_controls import AgentControls
|
||||
from monkey_island.cc.models.attack.attack_mitigations import AttackMitigations
|
||||
from monkey_island.cc.models.island_mode_model import IslandMode
|
||||
from monkey_island.cc.services.config import ConfigService
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -33,7 +32,7 @@ class Database(object):
|
|||
@staticmethod
|
||||
def _should_drop(collection: str, drop_config: bool) -> bool:
|
||||
if not drop_config:
|
||||
if collection == IslandMode.COLLECTION_NAME or collection == Config.COLLECTION_NAME:
|
||||
if collection == Config.COLLECTION_NAME:
|
||||
return False
|
||||
return (
|
||||
not collection.startswith("system.")
|
||||
|
|
Loading…
Reference in New Issue