mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 21:35:59 +08:00
fix: add check for empty services (#7611)
This commit is contained in:
parent
48936bed9b
commit
e723399f7f
@ -238,6 +238,7 @@ func (migration *updateIntegrations) Up(ctx context.Context, db *bun.DB) error {
|
|||||||
if err == nil && len(existingServices) > 0 {
|
if err == nil && len(existingServices) > 0 {
|
||||||
newServices := migration.
|
newServices := migration.
|
||||||
CopyOldCloudIntegrationServicesToNewCloudIntegrationServices(tx, orgIDs[0], existingServices)
|
CopyOldCloudIntegrationServicesToNewCloudIntegrationServices(tx, orgIDs[0], existingServices)
|
||||||
|
if len(newServices) > 0 {
|
||||||
_, err = tx.
|
_, err = tx.
|
||||||
NewInsert().
|
NewInsert().
|
||||||
Model(&newServices).
|
Model(&newServices).
|
||||||
@ -246,6 +247,7 @@ func (migration *updateIntegrations) Up(ctx context.Context, db *bun.DB) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user