From eb5c5b81bb4586eaadf408c4c95eca2ee26e9e6e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 19 Feb 2019 18:28:10 +0100 Subject: Fix test configuration --- ishtar_common/utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ishtar_common/utils.py') diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 2aa8db298..a263f3640 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -494,7 +494,9 @@ def post_save_geo(sender, **kwargs): # is loaded before models instance = kwargs.get('instance') - current_source = unicode(instance.__class__._meta.verbose_name) + current_source = "default" + if hasattr(instance.__class__, "_meta"): + current_source = unicode(instance.__class__._meta.verbose_name) if instance.point_source_item and \ instance.point_source_item != current_source: # refetch instance.point, instance.point_2d = None, None @@ -505,7 +507,6 @@ def post_save_geo(sender, **kwargs): point_2d = instance.point_2d profile = get_current_profile() modified = False - print (instance) if (point or point_2d) and instance.x is None and not \ instance.point_source: # db source -- cgit v1.2.3