Skip to content

Commit

Permalink
Merge pull request #160 from dekart-xyz/fix-playground-500
Browse files Browse the repository at this point in the history
Fix playground 500
  • Loading branch information
delfrrr committed Feb 28, 2024
2 parents 1c0a05f + e6ef8dd commit ced7022
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN CGO_ENABLED=0 go build ./src/server
FROM godeps as gotest
RUN go test -v -count=1 ./src/server/**/

FROM cypress/included:12.8.1 as e2etest
FROM cypress/included:12.17.1 as e2etest
WORKDIR /dekart
RUN apt-get update && apt-get install -y \
ca-certificates
Expand Down
8 changes: 8 additions & 0 deletions src/server/dekart/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func (s Server) getConnectionFromDatasetID(ctx context.Context, datasetID string
datasetID,
).Scan(&connectionID)
if err != nil {
if err == sql.ErrNoRows {
// legacy query
return s.getConnection(ctx, "")
}
log.Err(err).Send()
return nil, err
}
Expand All @@ -69,6 +73,10 @@ func (s Server) getConnectionFromQueryID(ctx context.Context, queryID string) (*
queryID,
).Scan(&connectionID)
if err != nil {
if err == sql.ErrNoRows {
// legacy query
return s.getConnection(ctx, "")
}
log.Err(err).Send()
return nil, err
}
Expand Down

0 comments on commit ced7022

Please sign in to comment.