DetachedInstanceError

Hello, we have this error 500 when accessing to the related tab of a dataset using a user logged in, server log:
```
[error] [client x.x.x.x] Error - <class 'sqlalchemy.orm.exc.DetachedInstanceError'>: Parent instance <Package at 0x7f1233618b10> is not bound to a Session; lazy load operation of attribute 'related' cannot proceed, referer: ...
```
When the user is not logged the related view works perfect.

Any help? Thanks