commit | f1d3d273b14a40859229c0d03bc4b2b16e2d93c2 | [log] [tgz] |
---|---|---|
author | Sapan Bhatia <gwsapan@gmail.com> | Mon Aug 18 02:24:22 2014 -0400 |
committer | Sapan Bhatia <gwsapan@gmail.com> | Mon Aug 18 02:24:22 2014 -0400 |
tree | a7d6a0de7f4804f9e8423b883847a661a8cd3bb4 | |
parent | 6810db24d99643479924046a6587c10fc9ad5ad8 [diff] [blame] |
Trying to commit an unsaved object with fields set causes the database to lock up.
diff --git a/planetstack/ec2_observer/syncstep.py b/planetstack/ec2_observer/syncstep.py index d5f7523..31fec04 100644 --- a/planetstack/ec2_observer/syncstep.py +++ b/planetstack/ec2_observer/syncstep.py
@@ -86,7 +86,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)