From 0431c4d6490ba351b392cefcc25a0a8f9fb56233 Mon Sep 17 00:00:00 2001 From: FLacombe Date: Thu, 24 Aug 2023 22:54:01 +0200 Subject: [PATCH] Put substation operator in static2 according to removal of operator select --- analysers/analyser_merge_power_line_FR.py | 3 ++- analysers/analyser_merge_power_substation_FR.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/analysers/analyser_merge_power_line_FR.py b/analysers/analyser_merge_power_line_FR.py index 3e1483a82..5a2ac0dce 100644 --- a/analysers/analyser_merge_power_line_FR.py +++ b/analysers/analyser_merge_power_line_FR.py @@ -51,7 +51,8 @@ def __init__(self, config, logger = None): 'power': 'line', 'operator': 'RTE', 'operator:wikidata': 'Q2178795'}, - static2 = {'source': self.source}, + static2 = { + 'source': self.source}, mapping1 = { 'voltage': lambda fields: str((int(float(fields['tension'].replace('kV', '')) * 1000))) if fields['tension'] not in ('HORS TENSION', '<45kV', 'COURANT CONTINU') else None, }, diff --git a/analysers/analyser_merge_power_substation_FR.py b/analysers/analyser_merge_power_substation_FR.py index 4b7a16aad..c92f6832b 100644 --- a/analysers/analyser_merge_power_substation_FR.py +++ b/analysers/analyser_merge_power_substation_FR.py @@ -55,11 +55,11 @@ def __init__(self, config, logger = None): tag_keep_multiple_values = ["voltage"], mapping = Mapping( static1 = { - "power": "substation", + "power": "substation"}, + static2 = { + "source": self.source, "operator": "RTE", "operator:wikidata": "Q2178795"}, - static2 = { - "source": self.source}, mapping1 = { "ref:FR:RTE": "Code poste", "ref:FR:RTE_nom": "Nom poste"},