git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cleanup accessors
[plcapi.git]
/
PLC
/
Table.py
diff --git
a/PLC/Table.py
b/PLC/Table.py
index
b811c62
..
8f434bf
100644
(file)
--- a/
PLC/Table.py
+++ b/
PLC/Table.py
@@
-1,5
+1,3
@@
-# $Id$
-# $URL$
from types import StringTypes, IntType, LongType
import time
import calendar
from types import StringTypes, IntType, LongType
import time
import calendar
@@
-315,13
+313,15
@@
class Row(dict):
y = self.db_fields(y)
return dict.__eq__(x, y)
y = self.db_fields(y)
return dict.__eq__(x, y)
- def sync(self, commit = True, insert = None):
+ # validate becomes optional on sept. 2010
+ # we find it useful to use DeletePerson on duplicated entries
+ def sync(self, commit = True, insert = None, validate=True):
"""
Flush changes back to the database.
"""
# Validate all specified fields
"""
Flush changes back to the database.
"""
# Validate all specified fields
- self.validate()
+
if validate:
self.validate()
# Filter out fields that cannot be set or updated directly
db_fields = self.db_fields()
# Filter out fields that cannot be set or updated directly
db_fields = self.db_fields()