Comment #1 on issue 3614 by mrcote: djblets prevents handling of generic django IntegrityErrors

Forgot to include my extension code. I created an extension with the tool and added this backend to (with the appropriate entry point in This extension just tries to add an 'admin' user, which already exists in my setup (created as part of 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()
            user = User.objects.create(username='admin', password='!',
        except IntegrityError:
            logging.exception('INTEGRITY ERROR')
        return None

    def get_or_create_user(self, username, request):
            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:

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 post to this group, send email to
Visit this group at
For more options, visit

Reply via email to