Hi,

On Sun, Mar 10, 2013 at 5:39 PM, Massimo Di Pierro
<[email protected]> wrote:
> Where is exception raised? We can fix it.


gluon/dal.py in update method line 9792,


The code (gluon/dal.py):
------------------------------------------------------------------------------------------------------------------------------
9783    def update(self, **update_fields):
 ...
9791        if not fields:
9792            raise SyntaxError("No fields to update") ### <--- HERE
the misleading exception
...
------------------------------------------------------------------------------------------------------------------------------
The significant part of the trace, in case you need it:

------------------------------------------------------------------------------------------------------------------------------

...
...
  File "myproject/gluon/tools.py", line 2100, in login
    self.settings.update_fields)
  File "myproject/gluon/tools.py", line 1740, in get_or_create_user
    user.update_record(**update_keys)
  File "myproject/gluon/dal.py", line 9883, in __call__
    table._db(table._id==id,ignore_common_filters=True).update(**newfields)
  File "myproject/gluon/dal.py", line 9792, in update
    raise SyntaxError("No fields to update")
SyntaxError: No fields to update


>>
>> Good that you found the cause.
>> I will update the ticket, because SyntaxError is quite misleading.
>>
>> If you can follow https://code.google.com/p/web2py/issues/detail?id=1369
>>



-- 
Ing. Leonardo Manuel Rocha

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to