Skip to content

Commit

Permalink
fix: add status as a condition for searching registercenter
Browse files Browse the repository at this point in the history
Signed-off-by: CeerDecy <[email protected]>
  • Loading branch information
CeerDecy committed Oct 22, 2024
1 parent b46e4bf commit 4d9fb93
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/tools/orchestrator/dbclient/addon_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ func (db *DBClient) GetAddonInstanceByNameAndCluster(addonName, cluster string)
if err := db.Where("addon_name = ?", addonName).
Where("az = ?", cluster).
Where("is_deleted = ?", apistructs.AddonNotDeleted).
Where("status = ?", apistructs.AddonAttached).

Check warning on line 122 in internal/tools/orchestrator/dbclient/addon_instance.go

View check run for this annotation

Codecov / codecov/patch

internal/tools/orchestrator/dbclient/addon_instance.go#L122

Added line #L122 was not covered by tests
First(&instance).Error; err != nil {
if gorm.IsRecordNotFoundError(err) {
return nil, nil
Expand Down

0 comments on commit 4d9fb93

Please sign in to comment.