from django.db import transaction

from agir.activity.models import Activity


@transaction.atomic()
def new_event_suggestion_notification(event, recipient):
    activity_config = {
        "type": Activity.TYPE_EVENT_SUGGESTION,
        "event": event,
        "status": Activity.STATUS_DISPLAYED,
    }
    if event.organizers_groups.count() > 0:
        activity_config["supportgroup"] = event.organizers_groups.first()
    else:
        activity_config["individual"] = event.organizers.first()

    Activity.objects.create(
        **activity_config, recipient=recipient,
    )

@@ -251,53 +251,8 @@
 nt,%0A
-        %22status%22: Activity.STATUS_DISPLAYED,%0A
     

remove activity status for the default one