Skip to content

Commit

Permalink
For Lizmap Cloud hosting, do not display -pre packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jul 4, 2024
1 parent ca8fd43 commit 6f86da5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lizmap/server_lwc.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ def update_action_version(

level, messages, qgis_valid = self._messages_for_version(
lizmap_version, qgis_server_version, login, version_file, self.qgis_desktop, error,
lizmap_cloud=lizmap_cloud)
lizmap_cloud=lizmap_cloud, is_dev=self.parent.is_dev_version)
if isinstance(qgis_valid, bool) and not qgis_valid:
self.table.item(row, TableCell.QgisVersion.value).setData(False, Qt.UserRole + 1)
self.table.item(row, TableCell.QgisVersion.value).setText(tr("Configuration error"))
Expand All @@ -866,6 +866,7 @@ def _messages_for_version(
qgis_desktop: Tuple[int, int],
error: str = '',
lizmap_cloud: bool = False,
is_dev: bool = False,
) -> Tuple[Qgis.MessageLevel, List[str], bool]:
"""Returns the list of messages and the color to use.
Expand Down Expand Up @@ -939,7 +940,10 @@ def _messages_for_version(

if bugfix > latest_bugfix:
# Congratulations :)
messages.append(tr('Higher than a public release') + ' 👍')
if lizmap_cloud and not is_dev:
messages.append('👍')
else:
messages.append(tr('Higher than a public release') + ' 👍')
level = Qgis.Success

elif bugfix < latest_bugfix or is_pre_package:
Expand Down

0 comments on commit 6f86da5

Please sign in to comment.