We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f58adad commit be58484Copy full SHA for be58484
tools_qgis.py
@@ -1554,8 +1554,10 @@ def check_query_layer(layer):
1554
try:
1555
# TODO:: Find differences between PostgreSQL and query layers, and replace this if condition.
1556
table_uri = layer.dataProvider().dataSourceUri()
1557
- if 'SELECT row_number() over ()' in str(table_uri) or \
1558
- layer is None or type(layer) is not QgsVectorLayer:
+ if layer is None \
+ or getattr(layer, 'isSqlQuery', False) \
1559
+ or 'SELECT row_number() over ()' in str(table_uri) \
1560
+ or type(layer) is not QgsVectorLayer:
1561
return False
1562
return True
1563
except Exception:
0 commit comments