diff --git a/arches/app/models/graph.py b/arches/app/models/graph.py index 8cf46b8c988..33332227705 100644 --- a/arches/app/models/graph.py +++ b/arches/app/models/graph.py @@ -321,6 +321,19 @@ def add_node(self, node, nodegroups=None): node.graph = self + if node.datatype in ("domain-value", "domain-value-list"): + node.config["i18n_config"] = { + "fn": "arches.app.datatypes.datatypes.DomainDataType", + } + node.config["options"] = [ + { + "id": str(option.pk), + "text": dict(option.text), + "selected": option.selected, + } + for option in node.domain_values.all() + ] + if self.ontology_id is None: node.ontologyclass = None if node.pk is None: diff --git a/arches/app/models/migrations/9946_domainvalue.py b/arches/app/models/migrations/9946_domainvalue.py index 600711a8246..851ac8cac55 100644 --- a/arches/app/models/migrations/9946_domainvalue.py +++ b/arches/app/models/migrations/9946_domainvalue.py @@ -34,7 +34,6 @@ def explode_configs(apps, schema_editor): # cannot bulk_update(), raises NotImplementedError dt.save(update_fields=["defaultconfig"]) -# TODO: verify whether changes needed in cards_x_nodes_x_widgets or widgets? def implode_configs(apps, schema_editor): DDataType = apps.get_model("models", "DDataType")