From bfd3308e3dd35c144e383802528fa4fb94ccd103 Mon Sep 17 00:00:00 2001 From: sreyemnayr Date: Wed, 21 Nov 2018 12:13:52 -0600 Subject: [PATCH] Fix --- field_history/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/field_history/models.py b/field_history/models.py index 4bbc9fa..efa34d0 100644 --- a/field_history/models.py +++ b/field_history/models.py @@ -27,6 +27,9 @@ def instantiate_object_id_field(object_id_class_or_tuple=models.TextField): object_id_class = object_id_class_or_tuple object_id_kwargs = {} + if type(object_id_class) is not type and type(object_id_class.__class__) is type: + object_id_class = object_id_class.__class__ + if not issubclass(object_id_class, models.fields.Field): raise TypeError('settings.%s must be a Django model field or (field, kwargs) tuple' % OBJECT_ID_TYPE_SETTING) if not isinstance(object_id_kwargs, dict):