Skip to content

Commit

Permalink
Fix plugin name
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Sep 27, 2024
1 parent e1a6328 commit be87ab1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lizmap_server/context/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import sys

from .common import ContextABC as ServerContext # noqa
from .common import model_dump_json, to_iso8601 # noqa
from .common import ProjectCacheError, model_dump_json, to_iso8601 # noqa

from ..logger import Logger


def create_server_context() -> ServerContext:
""" Create the appropriate server context
"""
Expand Down
7 changes: 5 additions & 2 deletions lizmap_server/context/py_qgis_server2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import Dict, Iterator, List, Optional, Sequence, Tuple

from py_qgis_contrib.core.qgis import QgisPluginService
from py_qgis_contrib.core import logger
from py_qgis_cache import CacheEntry, CacheManager, ProjectMetadata
from py_qgis_cache import CheckoutStatus as Co

Expand All @@ -16,6 +17,7 @@
to_iso8601,
)


SERVER_CONTEXT_NAME = 'py-qgis-server2'


Expand Down Expand Up @@ -84,9 +86,10 @@ def installed_plugins(
service = QgisPluginService.get_service()

for plugin in service.plugins:
md = plugin.metadata
md = plugin.metadata['general']
logger.trace("== PLUGIN METADATA(%s): %s", plugin.name, md)
yield (
plugin,
plugin.path.name,
{k: (md.get(k) or md.get(k.lower(), unknown_default)) for k in keys},
)

Expand Down

0 comments on commit be87ab1

Please sign in to comment.