Commit 52ca02fd by Ned Batchelder

model_name can be non-None, and model is still None

parent 583cd26f
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment