def validate(self, claim_type_id): claim_type = ClaimType.get_by_id(claim_type_id) if claim_type.name == "PERMISSION": super().custom.manual(ClaimTypeErrorCodes.PERMISSION_CLAIM_TYPE_IS_NOT_REMOVABLE)
def claim_type_get(self): from pyclaim.domain.aggregates.claim_type.model.claim_type import ClaimType return ClaimType.get_by_id(self.claim_type_id)