Пример #1
0
def _event_deleted(event, **kwargs):
    event_id = int(event.id)
    query = Request.find(
        Request.event_id == event_id,
        Request.state.in_((RequestState.accepted, RequestState.pending)))
    for req in query:
        req.definition.withdraw(req, notify_event_managers=False)
Пример #2
0
def _event_deleted(event, **kwargs):
    if not event.id.isdigit():
        return
    event_id = int(event.id)
    requests = Request.find(event_id=event_id)
    for req in requests.filter(Request.state.in_((RequestState.accepted, RequestState.pending))):
        req.definition.withdraw(req, notify_event_managers=False)
    requests.delete()
Пример #3
0
def _merge_users(user, merged, **kwargs):
    new_id = int(user.id)
    old_id = int(merged.id)
    Request.find(created_by_id=old_id).update({'created_by_id': new_id})
    Request.find(processed_by_id=old_id).update({'processed_by_id': new_id})
Пример #4
0
def _merge_users(target, source, **kwargs):
    Request.find(created_by_id=source.id).update(
        {Request.created_by_id: target.id})
    Request.find(processed_by_id=source.id).update(
        {Request.processed_by_id: target.id})
Пример #5
0
def _merge_users(target, source, **kwargs):
    from indico.modules.events.requests.models.requests import Request
    Request.find(created_by_id=source.id).update(
        {Request.created_by_id: target.id})
    Request.find(processed_by_id=source.id).update(
        {Request.processed_by_id: target.id})
Пример #6
0
def _merge_users(target, source, **kwargs):
    from indico.modules.events.requests.models.requests import Request
    Request.find(created_by_id=source.id).update({Request.created_by_id: target.id})
    Request.find(processed_by_id=source.id).update({Request.processed_by_id: target.id})
Пример #7
0
def _event_deleted(event, **kwargs):
    event_id = int(event.id)
    query = Request.find(Request.event_id == event_id,
                         Request.state.in_((RequestState.accepted, RequestState.pending)))
    for req in query:
        req.definition.withdraw(req, notify_event_managers=False)
Пример #8
0
def _merge_users(target, source, **kwargs):
    Request.find(created_by_id=source.id).update({Request.created_by_id: target.id})
    Request.find(processed_by_id=source.id).update({Request.processed_by_id: target.id})