Are self references broken on GAE?

2 views
Skip to first unread message

Miguel

unread,
Jan 6, 2010, 6:28:48 PM1/6/10
to web2py-users
Hi

I have the following model:

db.define_table("sites",
SQLField("category_id",db.category),
SQLField("owner",db.auth_user, writable=False, readable=False),
SQLField("url", "string",length=2048, notnull=True,
default=None),
SQLField("parent_site", "reference sites"))


However this gives me the following error on GAE

Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 173, in restricted
exec ccode in environment
File "C:/web2py/applications/mlinks/models/db.py", line 91, in
<module>
SQLField("posted_on","datetime",writable=False, readable=False))
File "C:\web2py\gluon\contrib\gql.py", line 127, in define_table
t = self[tablename] = Table(self, tablename, *fields)
File "C:\web2py\gluon\contrib\gql.py", line 203, in __init__
field.requires = gluon.sql.sqlhtml_validators(field)
File "C:\web2py\gluon\sql.py", line 454, in sqlhtml_validators
referenced = field._db[field_type[10:]]
File "C:\web2py\gluon\sql.py", line 1265, in __getitem__
return dict.__getitem__(self, str(key))
KeyError: 'sites'


Am I doing something wrong or is it a bug?

Thanks
Miguel

mdipierro

unread,
Jan 6, 2010, 6:33:33 PM1/6/10
to web2py-users
which web2py version. this should not happen with 1.74.5.

Miguel Goncalves

unread,
Jan 6, 2010, 6:37:47 PM1/6/10
to web...@googlegroups.com

I am on :

Version

web2py Version 1.74.5 (2009-12-30 15:44:00)



--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.




mdipierro

unread,
Jan 6, 2010, 7:21:24 PM1/6/10
to web2py-users
you found a bug. I just fixed it in trunk.

On Jan 6, 5:37 pm, Miguel Goncalves <goncalvesmig...@gmail.com> wrote:
> I am on :*Version* web2py Version 1.74.5 (2009-12-30 15:44:00)

> > web2py+un...@googlegroups.com<web2py%2Bunsu...@googlegroups.com>

Miguel Goncalves

unread,
Jan 7, 2010, 12:22:30 AM1/7/10
to web...@googlegroups.com
I just tried it and it works now.

Thanks Massimo!

-Miguel

To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages