Thanks for looking into this. I'm not exactly sure what 'Trunk' is. =) On Friday, July 26, 2013 8:03:32 PM UTC+12, Massimo Di Pierro wrote: > > There is a bug in SQLFORM.grid. I just pushed a fix to trunk. Please check > it. > > On Thursday, 25 July 2013 20:10:52 UTC-5, James Burke wrote: >> >> Hi, >> >> I just migrated my code from 2.4.6 to 2.5.1, I've encountered a problem >> trying to use a dict in my smartgrid >> >> with the following code: >> >> def test(): >> form = SQLFORM.smartgrid(db.supply, fields=dict(supply=[db.supply.id >> ]), linked_tables=dict(supply=['job','file'])) >> return dict(test=form) >> >> I get this error: >> >> <type 'exceptions.UnboundLocalError'> local variable 'fld' referenced >> before assignment >> Version >> web2py™ Version 2.5.1-stable+timestamp.2013.06.06.15.39.19 >> Python Python 2.7: C:\Program Files\myapp\web2py.exe (prefix: C:\Program >> Files\Terrasupply) >> Traceback >> >> >> Traceback (most recent call last): >> File "/home/mdipierro/make_web2py/web2py/gluon/restricted.py", line >> 212, in restricted >> File "C:/Program Files/myapp/applications/init/controllers/supply.py", >> line 424, in <module> >> File "/home/mdipierro/make_web2py/web2py/gluon/globals.py", line 194, >> in <lambda> >> File "/home/mdipierro/make_web2py/web2py/gluon/tools.py", line 3022, in >> f >> File "C:/Program Files/myapp/applications/init/controllers/supply.py", >> line 100, in test >> File "/home/mdipierro/make_web2py/web2py/gluon/sqlhtml.py", line 2641, >> in smartgrid >> UnboundLocalError: local variable 'fld' referenced before assignment >> >> Any ideas? >> >> Cheers, >> >> James >> >
-- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.