Skip to content

Commit

Permalink
Add log if the relation was not found when generating the tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jul 30, 2024
1 parent 6f86da5 commit 0078b70
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lizmap/tooltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ def create_popup_node_item_from_form(

if isinstance(node, QgsAttributeEditorRelation):
relation = node.relation()
a += Tooltip._generate_attribute_editor_relation(node.label(), relation.id(), relation.referencingLayerId())
if relation:
a += Tooltip._generate_attribute_editor_relation(node.label(), relation.id(), relation.referencingLayerId())
else:
# Ticket https://github.com/3liz/qgis-lizmap-server-plugin/issues/82
LOGGER.warning(
f"The node '{node.name()}::{node.label()}' cannot be processed for the tooltip "
f"because the relation has not been found.")

if isinstance(node, QgsAttributeEditorContainer):

Expand Down

0 comments on commit 0078b70

Please sign in to comment.