def METHOD_NAME(self, new_event):
    new_event._last_friendly_registration_id = (
        db.session
        .query(db.func.max(Registration.friendly_id))
        .filter(Registration.event_id == new_event.id)
        .scalar() or 0
    )