From 903855875ecc3266c0d40fb52b740933dfd346ee Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Wed, 7 Sep 2011 14:33:11 -0400 Subject: [PATCH] fix bug that prevented certain users from being deleted --- PLC/Persons.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PLC/Persons.py b/PLC/Persons.py index 1b66b4f..8813718 100644 --- a/PLC/Persons.py +++ b/PLC/Persons.py @@ -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) -- 2.43.0