diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86c5575f..39c9959c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,20 +12,20 @@ stages: - deploy - release -#qgis-server: -# stage: test -# parallel: -# matrix: -# - QGIS_VERSION: [ -# "3.16", -# "3.22", -# "3.28", -# "nightly-release", -# ] -# script: -# - make tests FLAVOR=${QGIS_VERSION} -# tags: -# - infrav3 +qgis-server: + stage: test + parallel: + matrix: + - QGIS_VERSION: [ + "3.16", + "3.22", + "3.28", + "nightly-release", + ] + script: + - make tests FLAVOR=${QGIS_VERSION} + tags: + - infrav3 flake: stage: test diff --git a/lizmap_server/legend_onoff_filter.py b/lizmap_server/legend_onoff_filter.py index 839143ac..5619d7ef 100644 --- a/lizmap_server/legend_onoff_filter.py +++ b/lizmap_server/legend_onoff_filter.py @@ -31,7 +31,7 @@ def _setup_legend(layer: QgsMapLayer, qs: str, onoff: bool): if layer_name == '' or key_list == '': continue # for the layer - if layer_name != layer.shortName() and layer_name != layer.name() and layer_name != layer.id(): + if layer_name not in (layer.shortName(), layer.name(), layer.id()): continue for key in key_list.split(','): @@ -46,15 +46,15 @@ def layerPermissions(self, layer: QgsMapLayer) -> QgsAccessControlFilter.LayerPe if 'LEGEND_ON' not in params and 'LEGEND_OFF' not in params: return rights - styles = params['STYLES'].split(',') if 'STYLES' in params and params['STYLES'] else [] + styles = params.get('STYLES', '').split(',') if len(styles) == 0: - styles = [params['STYLE']] if 'STYLE' in params and params['STYLE'] else [] + styles = params.get('STYLE', []) - layers = params['LAYERS'].split(',') if 'LAYERS' in params and params['LAYERS'] else [] + layers = params.get('LAYERS', '').split(',') if len(layers) == 0: - layers = [params['LAYER']] if 'LAYER' in params and params['LAYER'] else [] + layers = params.get('LAYER', []) # noinspection PyBroadException try: