Comment #1 on issue 3614 by mrcote: djblets prevents handling of generic
django IntegrityErrors
https://code.google.com/p/reviewboard/issues/detail?id=3614
Forgot to include my extension code. I created an extension with the
generate_extension.py tool and added this backend to extension.py (with the
appropriate entry point in setup.py). This extension just tries to add
an 'admin' user, which already exists in my setup (created as part of
prepare-dev.py). As mentioned, this should be caught by a generic
django.db.IntegrityError, but it isn't.
class IntegrityTestBackend(AuthBackend):
backend_id = _('integritytest')
name = _('IntegrityTest')
def authenticate(self, username, password):
username = username.strip()
try:
user = User.objects.create(username='admin', password='!',
email='[email protected]')
except IntegrityError:
logging.exception('INTEGRITY ERROR')
return None
def get_or_create_user(self, username, request):
try:
return User.objects.get(username=username)
except User.DoesNotExist:
return None
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
You received this message because you are subscribed to the Google Groups
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/d/optout.