Skip to content

Commit 38e835d

Browse files
committed
fix: bug fix persistent volume is exist check
1 parent 8104e8e commit 38e835d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swiftwave_manager/core/persistent_volume.operations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func IsExistPersistentVolume(ctx context.Context, db gorm.DB, name string, docke
1717
// verify from database
1818
var count int64
1919
tx := db.Model(&PersistentVolume{}).Where("name = ?", name).Count(&count)
20-
if tx != nil {
20+
if tx.Error != nil {
2121
return false, tx.Error
2222
}
2323
if count > 0 {

0 commit comments

Comments
 (0)