summaryrefslogtreecommitdiff
path: root/ishtar_common
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common')
-rw-r--r--ishtar_common/tests.py1
-rw-r--r--ishtar_common/utils.py5
2 files changed, 4 insertions, 2 deletions
diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py
index 55c43ac21..53db0baae 100644
--- a/ishtar_common/tests.py
+++ b/ishtar_common/tests.py
@@ -1577,6 +1577,7 @@ class GeomaticTest(TestCase):
self.z = z
self.spatial_reference_system = spatial_reference_system
self.point_source = 'P'
+ self.point_source_item = ""
self.point = point
self.point_2d = point_2d
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