You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "likyh (via GitHub)" <gi...@apache.org> on 2023/01/28 03:23:09 UTC

[GitHub] [incubator-devlake] likyh commented on a diff in pull request #4253: fix: SQL duplicate key error (#4240)

likyh commented on code in PR #4253:
URL: https://github.com/apache/incubator-devlake/pull/4253#discussion_r1089609074


##########
backend/server/services/blueprint_makeplan_v200.go:
##########
@@ -62,7 +62,7 @@ func GeneratePlanJsonV200(
 				Table:       scope.TableName(),
 				RowId:       scope.ScopeId(),
 			}
-			err = db.Create(projectMapping)
+			err = db.CreateOrUpdate(projectMapping)

Review Comment:
   Why it will be duplicated? The old `projectMapping`s have been deleted on Line#55. `scopes` have duplicated project?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org