@@ -200,30 +200,31 @@ def post_generate(self, project):
200
200
201
201
# 1:m relation will be added only if does not point to a pure link table
202
202
if (
203
- not (
204
- relation .referencing_layer .isPureLinkTable (project )
205
- or relation .referencing_layer .is_basket_table
206
- )
203
+ not relation .referencing_layer .isPureLinkTable (project )
207
204
or Qgis .QGIS_VERSION_INT < 31600
208
205
):
209
206
relations_to_add .append ((relation , None ))
210
207
211
- for nm_relation in project .relations :
212
- if nm_relation == relation :
213
- continue
208
+ else :
209
+ for nm_relation in project .relations :
210
+ if nm_relation == relation :
211
+ continue
214
212
215
- if nm_relation .referenced_layer == self :
216
- continue
213
+ if nm_relation .referenced_layer == self :
214
+ continue
217
215
218
- # relations to the same table with different geometries should not be added
219
- if nm_relation .referenced_layer .srid == self .srid :
220
- continue
216
+ # relations to the same table with different geometries should not be added
217
+ if nm_relation .referenced_layer .srid == self .srid :
218
+ continue
221
219
222
- if nm_relation .referenced_layer .is_basket_table :
223
- continue
220
+ if nm_relation .referenced_layer .is_basket_table :
221
+ continue
224
222
225
- if nm_relation .referencing_layer == relation .referencing_layer :
226
- relations_to_add .append ((relation , nm_relation ))
223
+ if (
224
+ nm_relation .referencing_layer
225
+ == relation .referencing_layer
226
+ ):
227
+ relations_to_add .append ((relation , nm_relation ))
227
228
228
229
for relation , nm_relation in relations_to_add :
229
230
if nm_relation and Qgis .QGIS_VERSION_INT < 31600 :
0 commit comments