robogals / myrobogals

myRobogals is the global intranet and record-keeping tool for Robogals. It has been built to simplify many of our day-to-day tasks including organising school visits, maintaining a member database, communicating with members, storing records reliably for future generations and easily collecting statistics on a global scale.
https://my.robogals.org
10 stars 21 forks source link

Error in newsletter API #46

Closed U-238 closed 11 years ago

U-238 commented 11 years ago
File "/home/myrobogals/robogals/myrobogals/rgmessages/views.py", line 498, in api
  p = PendingNewsletterSubscriber.objects.get(email=email, newsletter=n)

MultipleObjectsReturned: get() returned more than one PendingNewsletterSubscriber -- it returned 2! Lookup parameters were {'newsletter': <Newsletter: The Amplifier>, 'email': u'maxa@iceonline.com'}

Should probably use filter() instead of get() to avoid this issue.