mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix: fail to delete disconnected cloudaccount
This commit is contained in:
@@ -161,7 +161,7 @@ func (self *SCloudaccount) ValidateDeleteCondition(ctx context.Context) error {
|
||||
if self.Enabled {
|
||||
return httperrors.NewInvalidStatusError("account is enabled")
|
||||
}
|
||||
if self.getSyncStatus2() != api.CLOUD_PROVIDER_SYNC_STATUS_IDLE {
|
||||
if self.Status == api.CLOUD_PROVIDER_CONNECTED && self.getSyncStatus2() != api.CLOUD_PROVIDER_SYNC_STATUS_IDLE {
|
||||
return httperrors.NewInvalidStatusError("account is not idle")
|
||||
}
|
||||
cloudproviders := self.GetCloudproviders()
|
||||
|
||||
Reference in New Issue
Block a user