Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PMM-12448 Fix bug in backup preconditions check function #2437

Merged
merged 6 commits into from
Sep 13, 2023
4 changes: 3 additions & 1 deletion managed/services/preconditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ func CheckArtifactOverlapping(q *reform.Querier, serviceID, locationID, folder s
}

for _, artifact := range artifacts {
if artifact.ServiceID != serviceID {
// We skip artifacts made on services that are no longer exists in PMM. However, in future we can improve this function
// by storing required information right in artifact model.
if artifact.ServiceID != "" && artifact.ServiceID != serviceID {
svc, err := models.FindServiceByID(q, artifact.ServiceID)
if err != nil {
return err
Expand Down
Loading