Skip to content

Commit 2ea19d2

Browse files
authored
Merge pull request #306 from singlerider/fix-mongodbengine-check
fix mongodb engine check
2 parents 1aaba50 + 726c94e commit 2ea19d2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ Authors
4242
- Gregory Bataille
4343
- Jesse Shapiro
4444
- Kevin Foster
45+
- Shane Engelman
4546

4647
Background
4748
==========

simple_history/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ def convert_auto_field(field):
321321
must be replaced with an IntegerField.
322322
"""
323323
connection = router.db_for_write(field.model)
324-
if settings.DATABASES[connection]['ENGINE'] in ('django_mongodb_engine',):
324+
if settings.DATABASES[connection].get('ENGINE') in ('django_mongodb_engine',):
325325
# Check if AutoField is string for django-non-rel support
326326
return models.TextField
327327
return models.IntegerField

0 commit comments

Comments
 (0)