Exemple #1
0
    def create_claim_type(name):
        from pyclaim.domain.aggregates.claim_type.model.claim_type import ClaimType

        try:
            if not ClaimType.name_exists(name):
                claim_type = ClaimType()
                claim_type.name = name
                ClaimType.create(claim_type)
                return claim_type
        except Exception as ex:
            pass
Exemple #2
0
 def execute(self):
     claim_type = ClaimType()
     claim_type.name = self.name
     claim_type.create()
     return claim_type._id