fixed grid with id field not called id, issue 972

This commit is contained in:
mdipierro
2012-12-25 21:01:59 -06:00
parent cdedbaa1e9
commit 2365c34ce3
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.1-alpha.2+timestamp.2012.12.25.20.31.41
Version 2.4.1-alpha.2+timestamp.2012.12.25.21.01.19
+2 -2
View File
@@ -2429,7 +2429,7 @@ class SQLFORM(FORM):
cond = constraints.get(referee, None)
if cond:
record = db(
db[referee].id == id)(cond).select().first()
db[referee]._id == id)(cond).select().first()
else:
record = db[referee](id)
if previous_id:
@@ -2469,7 +2469,7 @@ class SQLFORM(FORM):
except (KeyError, ValueError, TypeError):
redirect(URL(args=table._tablename))
if nargs == len(args) + 1:
query = table.id > 0
query = table._id > 0
# filter out data info for displayed table
if table._tablename in constraints: