Access to the 'Many2Many' or 'One2many' fields from Flask

Hi,

When I try to access the ‘Many2Many’ or ‘One2Many’ fields from Flask I have the following error:

website (self): web.site,1
website.default_locale: ir.lang,9
Traceback (most recent call last):
  File "run.py", line 5, in <module>
    from application import app
  File "/home/ccr/Documents/Adiczion/technique/projets/naiad/application/__init__.py", line 28, in <module>
    print('website:', website.locales)
  File "/home/ccr/Technique/tryton/ate50/trytond/trytond/model/modelstorage.py", line 1351, in __getattr__
    self._transaction.database.IN_MAX)
AttributeError: 'NoneType' object has no attribute 'IN_MAX'

While on the other fields no problem

An idea?

Regards.

It seems that the decorator ‘@tryton.transaction()’ is mandatory when it is necessary to access this type of field.

It is always necessary to have a transaction when you try to access data from Tryton.