diff --git a/VERSION b/VERSION index 9ac82f3d..e1103116 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-08-05 19:52:16) dev +Version 2.00.0 (2012-08-05 21:19:55) dev diff --git a/gluon/contrib/populate.py b/gluon/contrib/populate.py index 7e93c3f0..813753c2 100644 --- a/gluon/contrib/populate.py +++ b/gluon/contrib/populate.py @@ -140,7 +140,7 @@ def populate(table, n, default=True, compute=False): ids[tablename] = [x.id for x in table._db(table._db[field.type[15:]].id>0).select()] n = len(ids[tablename]) if n: - record[fieldname] = [item[0] for item in random.sample(ids[tablename], random.randint(0,n-1)/2)] + record[fieldname] = [item for item in random.sample(ids[tablename], random.randint(0,n-1)/2)] else: record[fieldname] = 0 elif field.type=='list:string' and hasattr(field.requires,'options'):