neon-jungle / wagtail-birdsong

Create, send, preview, edit and test email campaigns from within Wagtail
BSD 3-Clause "New" or "Revised" License
103 stars 27 forks source link

NoReverseMatch error when creating / editing / previewing a Campaign with an unsbscribe link without contacts #31

Closed david-smejkal closed 1 year ago

david-smejkal commented 1 year ago

Error

django.urls.exceptions.NoReverseMatch: Reverse for 'unsubscribe' with arguments '('',)' not found

Steps to reproduce

  1. Follow the Readme all the way to Unsubscribe url without creating any Contact records.
  2. Then try to create / edit / preview a campaign in Wagtail backend.
  3. The error will be thrown because there is no Contact record to be used as a Test Contact to resolve the unsubscribe url reverse lookup.

Solution

Improve the Test Contact handling in Birdsong