diff --git a/g3w-admin/qdjango/utils/data.py b/g3w-admin/qdjango/utils/data.py index b3e18c0b7..1b447a963 100644 --- a/g3w-admin/qdjango/utils/data.py +++ b/g3w-admin/qdjango/utils/data.py @@ -391,20 +391,14 @@ def _getDataVectorjoins(self): try: vectorjoins = self.qgs_layer.vectorJoins() - - for order, join in enumerate(vectorjoins): + # Prefix management - # If sert custom prefix and the value is '', continue for cycle to avoid relation save - if layer_tree_vectorjoins[order].get('hasCustomPrefix') == '1' and join.prefix() == '': - continue + if layer_tree_vectorjoins[order].get("hasCustomPrefix") == "1": + prefix = join.prefix() else: - if layer_tree_vectorjoins[order].get("hasCustomPrefix") == "1": - prefix = join.prefix() - else: - prefix = f"{join.joinLayer().name()}_" - + prefix = f"{join.joinLayer().name()}_" ret.append( { @@ -1023,7 +1017,7 @@ def __init__(self, qgis_file, **kwargs): self.closeProject(**kwargs) - # register defaul validator + # register default validator for validator in self._defaultValidators: self.registerValidator(validator)