def get_task_subscription_raw(person_id, task_id): """ Return subscription matching given person and task. """ try: subscription = Subscription.get_by(person_id=person_id, task_id=task_id) return subscription except StatementError: return None
def get_sequence_subscription_raw(person_id, sequence_id, task_type_id): """ Return subscription matching given person, sequence and task type. """ try: subscription = Subscription.get_by(person_id=person_id, entity_id=sequence_id, task_type_id=task_type_id) return subscription except StatementError: return None