enable_record_versioning
This commit is contained in:
2
VERSION
2
VERSION
@@ -1 +1 @@
|
||||
Version 1.99.7 (2012-04-06 13:50:08) dev
|
||||
Version 1.99.7 (2012-04-07 09:08:06) dev
|
||||
|
||||
10
gluon/dal.py
10
gluon/dal.py
@@ -6948,11 +6948,11 @@ class Table(dict):
|
||||
def update(self,*args,**kwargs):
|
||||
raise RuntimeError, "Syntax Not Supported"
|
||||
|
||||
def _archive_records(self,
|
||||
archive_db=None,
|
||||
archive_name = '%(tablename)_archive',
|
||||
current_record = 'current_record',
|
||||
is_active = 'is_active'):
|
||||
def _enable_record_versioning(self,
|
||||
archive_db=None,
|
||||
archive_name = '%(tablename)_archive',
|
||||
current_record = 'current_record',
|
||||
is_active = 'is_active'):
|
||||
archive_db = archive_db or self._db
|
||||
fieldnames = self.fields()
|
||||
archive_name = archive_name % dict(tablename=self._tablename)
|
||||
|
||||
@@ -1291,7 +1291,7 @@ class Auth(object):
|
||||
tables = [table for table in tables]
|
||||
for table in tables:
|
||||
if 'modifed_on' in table.fields():
|
||||
table._archive_records(
|
||||
table._enable_record_versioning(
|
||||
archive_db = archive_db,
|
||||
archive_name = archive_names,
|
||||
current_record = current_record)
|
||||
|
||||
Reference in New Issue
Block a user