fix bug that prevented certain users from being deleted
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 7 Sep 2011 18:33:11 +0000 (14:33 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 7 Sep 2011 18:33:11 +0000 (14:33 -0400)
PLC/Persons.py

index 1b66b4f..8813718 100644 (file)
@@ -360,11 +360,10 @@ class Person(Row):
         # Mark as deleted
         self['deleted'] = True
 
-        # delete will fail if verification_expires exists and isn't validated
-        if 'verification_expires' in self:
-            #self['verification_expires'] = \
-            #self.validate_verification_expires(self['verification_expires'])
-            self.pop('verification_expires')
+        # delete will fail if timestamp fields aren't validated, so lets remove them
+        for field in ['verification_expires', 'date_created', 'last_updated']:
+            if field in self:
+                self.pop(field)
 
         # don't validate, so duplicates can be consistently removed
         self.sync(commit, validate=False)