Skip to content

Commit

Permalink
Minor Python refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Oct 18, 2023
1 parent 26d3fb3 commit 062d736
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lizmap/definitions/warnings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
class Warnings(Enum):
OgcNotValid = 'ogc_not_valid'
UseLayerIdAsName = 'use_layer_id_as_name'
SaasLizmapDotCom = 'saas_lizmap_dot_com_invalid'
SaasLizmapCloud = 'saas_lizmap_cloud_invalid'
InvalidFieldType = 'invalid_field_type'
DuplicatedLayersWithFilters = 'duplicated_layers_with_filters'
6 changes: 3 additions & 3 deletions lizmap/dialogs/server_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def nextId(self) -> int:
""" Next page, according to lizmap.com hosting. """
# Temporary disable the PG page
# parent_wizard: ServerWizard = self.wizard()
# if parent_wizard.is_lizmap_dot_com:
# if parent_wizard.is_lizmap_cloud:
# LOGGER.debug("After saving the auth ID, go the PostgreSQL page.")
# return WizardPages.AddOrNotPostgresqlPage

Expand Down Expand Up @@ -765,7 +765,7 @@ def __init__(self, parent=None, existing: list = None, url: str = '', auth_id: s

self.auth_id = auth_id
self.server_info = None
self.is_lizmap_dot_com = False
self.is_lizmap_cloud = False
self.has_repository = None
self.dav_url = None
self.dav_path = None
Expand Down Expand Up @@ -1081,7 +1081,7 @@ def request_check_url(self, url: str, login: str, password: str) -> Tuple[bool,
return False, message, True

self.server_info = content
self.is_lizmap_dot_com = content.get('hosting', '') == 'lizmap.com'
self.is_lizmap_cloud = content.get('hosting', '') == 'lizmap.com'
self.has_repository = True if len(content.get('repositories', [])) >= 1 else False
if any(item in version() for item in UNSTABLE_VERSION_PREFIX):
# Debug for devs
Expand Down
6 changes: 3 additions & 3 deletions lizmap/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def write_log_message(message, tag, level):
self.dlg.label_action_scope_layer_project,
]

self.lizmap_dot_com = [
self.lizmap_cloud = [
self.dlg.label_lizmap_search_grant,
]

Expand Down Expand Up @@ -811,7 +811,7 @@ def target_server_changed(self):
self.check_webdav()

lizmap_cloud = is_lizmap_cloud(current_metadata)
for item in self.lizmap_dot_com:
for item in self.lizmap_cloud:
item.setVisible(lizmap_cloud)

# For deprecated features in LWC 3.7 about base layers
Expand Down Expand Up @@ -2827,7 +2827,7 @@ def project_config_file(self, lwc_version: LwcVersions, with_gui: bool = True, c
if check_server and is_lizmap_cloud(server_metadata):
error, results, more = valid_lizmap_cloud(self.project, lwc_version)
if error:
warnings.append(Warnings.SaasLizmapDotCom.value)
warnings.append(Warnings.SaasLizmapCloud.value)

message = tr('Some configurations are not valid when used with a Lizmap.com hosting :')

Expand Down

0 comments on commit 062d736

Please sign in to comment.