I changed the Syntax to: db.intro_lifestyles.tourism_segment_id.contains(segment.id)
and it is now working. Thanks a lot that would be a solution too... quinta-feira, 3 de Agosto de 2017 às 23:18:23 UTC+1, Anthony escreveu: > > Have you tried: > > db.intro_lifestyles.tourism_segment_id == [segment.id] > > Your original code may have worked in the older version, but I don't think > that syntax was officially supported. > > Anthony > > On Thursday, August 3, 2017 at 5:57:45 PM UTC-4, José Leite wrote: >> >> I have just updated to web2py 2.15.2 and my site www.holidaysenses.com >> became >> unstable (unusable). >> >> Line codes like: >> image = db(db.intro_lifestyles.tourism_segment_id == segment.id >> ).select().first() >> or >> image = db(db.intro_regions.region_id == region.id).select().first() >> >> where db.intro_lifestyles.tourism_segment_id and >> db.intro_regions.region_id are List:references with only one element each >> to tables "segment" and "region" respectively raise the following error: >> >> File "/home/www-data/web2py/gluon/packages/dal/pydal/helpers/methods.py", >> line 95, in bar_encode >> return '|%s|' % '|'.join(bar_escape(item) for item in items if >> str(item).strip()) >> TypeError: 'long' object is not iterable >> >> The site was working fine before... >> > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.