From 48a4277ea293c334a73e1ca48acc25585ac1bc32 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 14 Oct 2012 16:40:49 -0500 Subject: [PATCH] fixed issue 1088 --- VERSION | 2 +- gluon/dal.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 513a6ef6..968fa96d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.1.0 (2012-10-14 15:55:41) dev +Version 2.1.0 (2012-10-14 16:40:34) dev diff --git a/gluon/dal.py b/gluon/dal.py index a0c38767..31e068c6 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -6801,7 +6801,12 @@ class DAL(object): try: sql_fields = cPickle.load(tfile) name = filename[len(pattern)-7:-6] - mf = [(value['sortable'],Field(key,type=value['type'])) \ + mf = [(value['sortable'], + Field(key, + type=value['type'], + length=value.get('length',None), + notnull=value.get('notnull',False), + unique=value.get('unique',False))) \ for key, value in sql_fields.iteritems()] mf.sort(lambda a,b: cmp(a[0],b[0])) self.define_table(name,*[item[1] for item in mf],