Projet

Général

Profil

0002-sp_fr-add-alias-with-_1-suffix-to-cater-for-nodes-wi.patch

Benjamin Dauvergne, 20 mai 2019 11:38

Télécharger (1,03 ko)

Voir les différences:

Subject: [PATCH 2/2] 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(+)
passerelle/apps/sp_fr/models.py
490 490
                            yield p, value
491 491
                else:
492 492
                    yield path, text_content(node)
493
                    # case of multiple nodes
494
                    new_path = path[:-1] + [path[-1] + '_1']
495
                    yield new_path, text_content(node)
493 496
            return {'_'.join(path): value for path, value in helper([tag_name(root)], root)}
494 497

  
495 498
    class Meta:
496
-