mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix: guestimage log panic
This commit is contained in:
@@ -17,6 +17,7 @@ package models
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"yunion.io/x/pkg/errors"
|
||||
"yunion.io/x/sqlchemy"
|
||||
@@ -115,6 +116,10 @@ func (gm *SGuestImageJointManager) GetImagesByGuestImageId(guestImageId string)
|
||||
})
|
||||
}
|
||||
|
||||
func (gt *SGuestImageJoint) GetId() string {
|
||||
return fmt.Sprintf("guestimage-%s-image-%s", gt.GuestImageId, gt.ImageId)
|
||||
}
|
||||
|
||||
func (gt *SGuestImageJoint) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error {
|
||||
return db.DeleteModel(ctx, userCred, gt)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user