Ejemplo n.º 1
0
def status_changed(message, **kwargs):
    new_status = safe_object(message)
    concept = new_status.concept

    for status in concept.current_statuses().all():
        for registrar in status.registrationAuthority.registrars.all():
            if concept.statuses.filter(registrationAuthority=new_status.registrationAuthority).count() <= 1:
                # 0 or 1 because the transaction may not be complete yet
                messages.registrar_item_registered(recipient=registrar, obj=concept)
            else:
                messages.registrar_item_changed_status(recipient=registrar, obj=concept)
def status_changed(message, **kwargs):
    new_status = safe_object(message)
    concept = new_status.concept

    for status in concept.current_statuses().all():
        for registrar in status.registrationAuthority.registrars.all():
            if concept.statuses.filter(registrationAuthority=new_status.registrationAuthority).count() <= 1:
                # 0 or 1 because the transaction may not be complete yet
                messages.registrar_item_registered(recipient=registrar, obj=concept)
            else:
                messages.registrar_item_changed_status(recipient=registrar, obj=concept)
Ejemplo n.º 3
0
def status_changed(message, **kwargs):
    instance = safe_object(message)
    new_status = MDR.Status.objects.get(pk=message["status_id"])

    for status in instance.current_statuses().all():
        for registrar in status.registrationAuthority.registrars.all():
            if instance.statuses.filter(registrationAuthority=new_status.registrationAuthority).count() <= 1:
                # 0 or 1 because the transaction may not be complete yet
                messages.registrar_item_registered(recipient=registrar, obj=instance)
            else:
                messages.registrar_item_changed_status(recipient=registrar, obj=instance)
def status_changed(message, **kwargs):
    instance = safe_object(message)
    new_status = MDR.Status.objects.get(pk=message['status_id'])

    for status in instance.current_statuses().all():
        for registrar in status.registrationAuthority.registrars.all():
            if instance.statuses.filter(registrationAuthority=new_status.
                                        registrationAuthority).count() <= 1:
                # 0 or 1 because the transaction may not be complete yet
                messages.registrar_item_registered(recipient=registrar,
                                                   obj=instance)
            else:
                messages.registrar_item_changed_status(recipient=registrar,
                                                       obj=instance)