Trying to commit an unsaved object with fields set causes the database
to lock up.
diff --git a/planetstack/openstack_observer/syncstep.py b/planetstack/openstack_observer/syncstep.py
index c77c8d5..324829d 100644
--- a/planetstack/openstack_observer/syncstep.py
+++ b/planetstack/openstack_observer/syncstep.py
@@ -84,7 +84,8 @@
except:
o.backend_status = str(e)
- o.save(update_fields=['backend_status'])
+ if (o.pk):
+ o.save(update_fields=['backend_status'])
logger.log_exc("sync step failed!")
failed.append(o)