From 7c47619e2f27d6dbcd49a694d61a8b483604ff95 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Thu, 29 Aug 2013 21:16:16 -0500 Subject: [PATCH] fixed issue 1654, auth.enable_record_versioning(db), thanks hitkatojp --- VERSION | 2 +- gluon/tools.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 8f93069f..60efd36c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.08.29.18.56.54 +Version 2.6.0-development+timestamp.2013.08.29.21.15.25 diff --git a/gluon/tools.py b/gluon/tools.py index 63aaaaf3..a717e5a6 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -1549,9 +1549,11 @@ class Auth(object): does automatically. """ - tables = [table for table in tables] for table in tables: - if '_id' in table.fields() and 'modified_on' in table.fields() and not current_record in table.fields(): + fieldnames = table.fields() + if ('id' in fieldnames and + 'modified_on' in fieldnames and + not current_record in fieldnames): table._enable_record_versioning( archive_db=archive_db, archive_name=archive_names,