~coreygoldberg/canonical-identity-provider/scripted-unittest

« back to all changes in this revision

Viewing changes to identityprovider/webservice/models.py

  • Committer: Tarmac
  • Author(s): Łukasz Czyżykowski
  • Date: 2010-10-06 08:42:41 UTC
  • mfrom: (3.89.1 fix-api-email-error)
  • Revision ID: tarmac-20101006084241-9ym50ogqq2qugd8s
Fixed inconsistency for API error returned when email is already registered.

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
        emails = EmailAddress.objects.filter(email__iexact=requested_email)
232
232
        if len(emails) > 0:
233
233
            return {'status': 'error', 'errors':
234
 
                    {'email': 'Email already registered'}}
 
234
                    {'email': ['Email already registered']}}
235
235
 
236
236
        account = Account.objects.create(
237
237
            creation_rationale=AccountCreationRationale.OWNER_CREATED_LAUNCHPAD,