From 20c614261c4ea79104a7af9fcdb3bf6a70bd59d5 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Mon, 20 May 2019 11:36:38 +0200 Subject: [PATCH 2/3] sp_fr: add alias with _1 suffix to cater for nodes with maxOccurs > 1 (#33256) Text nodes which can be multiple must always have a counter suffix. --- passerelle/apps/sp_fr/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/passerelle/apps/sp_fr/models.py b/passerelle/apps/sp_fr/models.py index e987915f..b0c69929 100644 --- a/passerelle/apps/sp_fr/models.py +++ b/passerelle/apps/sp_fr/models.py @@ -490,6 +490,9 @@ class Resource(BaseResource): yield p, value else: yield path, text_content(node) + # case of multiple nodes + new_path = path[:-1] + [path[-1] + '_1'] + yield new_path, text_content(node) return {'_'.join(path): value for path, value in helper([tag_name(root)], root)} class Meta: -- 2.20.1