You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticied when in a model you configured a field as lazy='dynamic', the ResourceRelationship faild because the relational object is a query, and not a InstrumentedList.
Possible Fix:
data_layers/alchemy.py:246
Add:
if hasattr(related_objects, 'all'): related_objects = InstrumentedList(related_objects.all())
We know the dynamic lazy relationships are only for many to many or ont to many. So we know if the related_objects var has the 'all' attribute, we must to call .all() and return the InstrumentedList to continue with the flow.
any other idea, please tell me!!
Sorry for my Englsih :-(
The text was updated successfully, but these errors were encountered:
I noticied when in a model you configured a field as
lazy='dynamic'
, the ResourceRelationship faild because the relational object is a query, and not a InstrumentedList.Possible Fix:
data_layers/alchemy.py:246
Add:
if hasattr(related_objects, 'all'): related_objects = InstrumentedList(related_objects.all())
We know the dynamic lazy relationships are only for many to many or ont to many. So we know if the related_objects var has the 'all' attribute, we must to call
.all()
and return the InstrumentedList to continue with the flow.any other idea, please tell me!!
Sorry for my Englsih :-(
The text was updated successfully, but these errors were encountered: