Skip to content

Commit 6e14cfa

Browse files
fix: fix scope config for postgresql (#8265)
1 parent afe0f6e commit 6e14cfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/helpers/srvhelper/scope_config_service_helper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (scopeConfigSrv *ScopeConfigSrvHelper[C, S, SC]) GetProjectsByScopeConfig(p
8282
dal.Select(fmt.Sprintf("bp.id AS blueprint_id, bp.project_name, bps.scope_id, %s.*", scopeTable)),
8383
dal.From("_devlake_blueprint_scopes bps"),
8484
dal.Join("LEFT JOIN _devlake_blueprints bp ON (bp.id = bps.blueprint_id)"),
85-
dal.Join(fmt.Sprintf("LEFT JOIN %s ON (%s.connection_id = bps.connection_id AND %s = bps.scope_id)", scopeTable, scopeTable, theOtherPk)),
85+
dal.Join(fmt.Sprintf("LEFT JOIN %s ON (%s.connection_id = bps.connection_id AND cast(%s as varchar) = bps.scope_id)", scopeTable, scopeTable, theOtherPk)),
8686
dal.Where("bps.plugin_name = ? AND bps.connection_id = ?", pluginName, (*scopeConfig).ScopeConfigConnectionId()),
8787
))
8888
projectScopeMap := make(map[string]*models.ProjectScope)

0 commit comments

Comments
 (0)