Closed Gustry closed 4 years ago
For a workaround with @rldhont , we removed the use of the relation in the atlas. We used a plain QGIS expression to filter my attribute table:
"insee_dep" = attribute( @atlas_feature , 'insee_dep')
And it's working.
Relations are read in the QGIS Project document after readProjectWithContext
emission by QgsProject
.
@dmarteau can we made a test with py-qgis-server ?
This has been fixed in QGIS 3.10.2 and master. QGIS 3.4 should be used with cautious about relation. I will add a note.
In the plugin, we have an issue with missing relation in QgsProject.
For example, I have an atlas on French department. And I have a relation to a French cities layer. In my atlas, I'm display a few cities in a table belonging to the current department.
In QGIS Desktop, it's working well, but using the atlasprint plugin, the relation table is empty.
Nothing in my logs. I added this code in the
core.py
for instance.The problem is we have no access when the QgsProject is created, the object comes from
executeRequest
method inQgsService
https://github.com/3liz/qgis-atlasprint/blob/master/atlasprint/service.py#L108 which is in QGIS core.So it's maybe an upstream bug?
This is a regression from 1.2.4
CC @rldhont @dmarteau