- def get_status_handler():
- # delete if applicable (will raise if not applicable to begin with)
- data.delete_policy_instance_if_applicable(policy_type_id, policy_instance_id)
-
- vector = data.get_policy_instance_statuses(policy_type_id, policy_instance_id)
- for i in vector:
- if i == "OK":
- return "IN EFFECT", 200
- return "NOT IN EFFECT", 200
-
- return _try_func_return(get_status_handler)