From 8c88482d416d2043019e69a4c72b1408dd84ae1f Mon Sep 17 00:00:00 2001 From: Galen Date: Fri, 23 Aug 2024 15:38:01 -0700 Subject: [PATCH] fix ambiguous graphid refs in branch_views psql fn, re #11396 --- arches/app/models/migrations/7787_relational_data_model.py | 2 +- .../models/migrations/8813_resource_model_view_defaults.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arches/app/models/migrations/7787_relational_data_model.py b/arches/app/models/migrations/7787_relational_data_model.py index 40d79a462c8..f6c5d0224f4 100644 --- a/arches/app/models/migrations/7787_relational_data_model.py +++ b/arches/app/models/migrations/7787_relational_data_model.py @@ -261,7 +261,7 @@ class Migration(migrations.Migration): join node_groups g on g.nodegroupid = n.nodegroupid where n.nodeid = n.nodegroupid and g.parentnodegroupid is null - and graphid = model_id + and n.graphid = model_id loop perform __arches_create_branch_views(node.nodeid, schema_name, ''); end loop; diff --git a/arches/app/models/migrations/8813_resource_model_view_defaults.py b/arches/app/models/migrations/8813_resource_model_view_defaults.py index bd4e7e4b5a3..58ed0a7af1d 100644 --- a/arches/app/models/migrations/8813_resource_model_view_defaults.py +++ b/arches/app/models/migrations/8813_resource_model_view_defaults.py @@ -141,7 +141,7 @@ class Migration(migrations.Migration): join node_groups g on g.nodegroupid = n.nodegroupid where n.nodeid = n.nodegroupid and g.parentnodegroupid is null - and graphid = model_id + and n.graphid = model_id loop perform __arches_create_branch_views(node.nodeid, schema_name, ''); end loop; @@ -281,7 +281,7 @@ class Migration(migrations.Migration): join node_groups g on g.nodegroupid = n.nodegroupid where n.nodeid = n.nodegroupid and g.parentnodegroupid is null - and graphid = model_id + and n.graphid = model_id loop perform __arches_create_branch_views(node.nodeid, schema_name, ''); end loop;