Added section markers to monkey model

This commit is contained in:
Shay Nehmad 2019-05-07 17:21:05 +03:00
parent 81e49b45ce
commit bf3b2df253
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,7 @@ class Monkey(Document):
* The logic section defines complex questions we can ask about a single document which are asked multiple * The logic section defines complex questions we can ask about a single document which are asked multiple
times, somewhat like an API. times, somewhat like an API.
""" """
# SCHEMA
guid = StringField(required=True) guid = StringField(required=True)
config = EmbeddedDocumentField('Config') config = EmbeddedDocumentField('Config')
creds = ListField(EmbeddedDocumentField('Creds')) creds = ListField(EmbeddedDocumentField('Creds'))
@ -33,6 +34,7 @@ class Monkey(Document):
pba_results = ListField() pba_results = ListField()
ttl_ref = ReferenceField(MonkeyTtl) ttl_ref = ReferenceField(MonkeyTtl)
# LOGIC
@staticmethod @staticmethod
def get_single_monkey_by_id(db_id): def get_single_monkey_by_id(db_id):
try: try: