Пример #1
0
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
Пример #2
0
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