scout/adapter/mongo/case.py
def _add_case(self, case_obj):
        """Add a case to the database
           If the case already exists exception is raised

            Args:
                case_obj(Case)
        """
        if self.case(case_obj['_id']):
            raise IntegrityError("Case %s already exists in database" % case_obj['_id'])

        return self.case_collection.insert_one(case_obj)
def _add_case(self, case_obj):
        if self.case(case_obj['_id']):
            raise IntegrityError("Case %s already exists in database" % case_obj['_id'])

        return self.case_collection.insert_one(case_obj)
def _add_case ( self , case_obj ) : if self . case ( case_obj [ '_id' ] ) : raise IntegrityError ( "Case %s already exists in database" % case_obj [ '_id' ] ) return self . case_collection . insert_one ( case_obj )
Add a case to the database
           If the case already exists exception is raised

            Args:
                case_obj(Case)
Add a case to the database If the case already exists exception is raised