Can you show us the db.Reservations definition and in particular its
widgets and validators.
there seems to be an invalid query in a IS_IN_DB somewhere.
On Tuesday, 29 October 2013 08:28:06 UTC-5, David Manns wrote:
>
> I have been running my application on GAE using Python 2.7 and web2py
> 2.4.
I have attached the reservations section from my model. Also the relevant
section of the controller script - a number of validators are set up at run
time. The failure case is the crud.update() in the middle of the function,
modifying an existing reservation. There are no custom widgets involved
Not sure what the problem is but it it fails because of this:
affl = db(db.Colleges.id.belongs(cl))
db.Reservations.Affiliation.requires = IS_EMPTY_OR(IS_IN_DB(affl,
db.Colleges.id, '%(Name)s',orderby=db.Colleges.Name))
could it be affl is empty?
On Tuesday, 29 October 2013 14:24:38 UTC-5, D
This validator is only used if affs is non-empty, I.e. the member has known
college affiliations. Otherwise the standard validator is used, allowing any
college in the table to be selected. In the failure case, affs was non-empty.
So that doesn't seem to be the problem.
--
Resources:
- http://
Don't know if this helps, but I see that the query for affl uses belongs,
and I'm seeing the following in my GAE log for a query that uses belongs:
File
> "/Users/shunter/Dropbox/webdev/google_app_engine/mypptrials/gluon/dal.py",
> line 4802, in BELONGS
> raise SyntaxError("Not supported"
Scott is probably right - I will do some experiments to check. Earlier
versions of web2py supported 'belongs' on GAE so long as the set contained
30 or fewer members (by experiment, not documented). I can see how this
limited support may have been dropped in a DAL rewrite!
On Tuesday, October 2
'Belongs' was the problem. Older versions of web2py supported a limited
implementation of belongs (up to 30 items in the set) on GAE datastore.
Current version does not support 'belongs' on GAE datastore. I have worked
around this and now have my application working again. Thanks Scott and
Mass
This doesn't sound very "backwards compatible" to me; I couldn't find any
documentation that says belongs DOESN'T work in GAE, and it clearly used to
(if imperfectly).
So is the bug that it USED to work, or that it doesn't work now?
On Wednesday, October 30, 2013 11:53:04 AM UTC-4, David Manns
Belongs on GAE has always been supported. The cited code in version 2.7.4 is
def BELONGS(self,first,second=None):
if not isinstance(second,(list, tuple)):
raise SyntaxError("Not supported")
...
So perhaps you are passing something to belongs which is not a list or
tup
I was passing the contents of a list:reference field
On Wednesday, October 30, 2013 9:59:29 PM UTC-4, Massimo Di Pierro wrote:
>
> Belongs on GAE has always been supported. The cited code in version 2.7.4
> is
>
> def BELONGS(self,first,second=None):
> if not isinstance(second,(list, tupl
My case too was passing a list of values from a reference field.
On Wednesday, October 30, 2013 9:59:29 PM UTC-4, Massimo Di Pierro wrote:
>
> Belongs on GAE has always been supported. The cited code in version 2.7.4
> is
>
> def BELONGS(self,first,second=None):
> if not isinstance(second
Please open a ticket pointing this thread. We can add support for this.
On Thursday, 31 October 2013 15:11:59 UTC-5, David Manns wrote:
>
> My case too was passing a list of values from a reference field.
>
> On Wednesday, October 30, 2013 9:59:29 PM UTC-4, Massimo Di Pierro wrote:
>>
>> Belongs o
12 matches
Mail list logo