another change to better support arbitrary named id fields

This commit is contained in:
Massimo Di Pierro
2012-01-21 16:59:44 -06:00
parent 6837da0917
commit 02bd396c03
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2012-01-20 11:36:35) stable
Version 1.99.4 (2012-01-21 16:59:06) stable
+1 -1
View File
@@ -546,7 +546,7 @@ class IS_NOT_IN_DB(Validator):
for f in self.record_id:
if str(getattr(rows[0], f)) != str(self.record_id[f]):
return (value, translate(self.error_message))
elif str(rows[0].id) != str(self.record_id):
elif str(rows[0]._id) != str(self.record_id):
return (value, translate(self.error_message))
return (value, None)