opslog: remove unneeded nil check

This commit is contained in:
Yousong Zhou
2020-06-18 19:18:48 +08:00
parent 50449ca014
commit 4bbf7c0484
+1 -1
View File
@@ -394,7 +394,7 @@ func (manager *SOpsLogManager) LogEvent(model IModel, action string, notes inter
}
opslog.SetModelManager(OpsLog, opslog)
if virtualModel, ok := model.(IVirtualModel); ok && virtualModel != nil {
if virtualModel, ok := model.(IVirtualModel); ok {
ownerId := virtualModel.GetOwnerId()
if ownerId != nil {
opslog.OwnerProjectId = ownerId.GetProjectId()