Merge pull request #14519 from edx/nedbat/idempotent-email-uniqueness-constraint

An idempotent migration to add an email uniqueness constraint
This commit is contained in:
Ned Batchelder
2017-02-16 09:58:07 -05:00
committed by GitHub
7 changed files with 45 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ class StudentModuleHistoryExtendedRouter(object):
"""
if model_name is not None:
model = hints.get('model')
if self._is_csmh(model):
if model is not None and self._is_csmh(model):
return db == self.DATABASE_NAME
if db == self.DATABASE_NAME:
return False