Worked around an exception
authorSapan Bhatia <sapanb@cs.princeton.edu>
Sun, 21 Dec 2014 07:32:50 +0000 (02:32 -0500)
committerSapan Bhatia <sapanb@cs.princeton.edu>
Sun, 21 Dec 2014 07:32:50 +0000 (02:32 -0500)
planetstack/model_policy.py

index 38cc4df..de6f73d 100644 (file)
@@ -12,8 +12,12 @@ def EnableModelPolicy(x):
     modelPolicyEnabled = x
 
 def update_dep(d, o):
-       if (d.updated < o.updated):
-               d.save(update_fields=['updated'])
+       try:
+               if (d.updated < o.updated):
+                       d.save(update_fields=['updated'])
+       except AttributeError,e:
+               pdb.set_trace()
+               raise e
        
 def delete_if_inactive(d, o):
        #print "Deleting %s (%s)"%(d,d.__class__.__name__)