fix: 删除重复的SaveVideoSourceAsset调用,解决改名时先创建后更新的bug
This commit is contained in:
parent
873cc3e1a4
commit
210465cc71
@ -3744,16 +3744,6 @@ func (u *UI) actionAssetVideoSourceSave(w http.ResponseWriter, r *http.Request)
|
||||
MountAngle: strings.TrimSpace(r.FormValue("mount_angle")),
|
||||
},
|
||||
}
|
||||
if err := u.preview.SaveVideoSourceAsset(asset, ""); err != nil {
|
||||
data := u.assetPageData("video-sources")
|
||||
data.Title = "资产管理"
|
||||
data.Error = err.Error()
|
||||
data.AssetVideoSource = &asset
|
||||
data.AssetVideoSource.SourceTypeLabel = serviceVideoSourceTypeLabel(asset.SourceType)
|
||||
data.AssetVideoSourceEditing = true
|
||||
u.render(w, r, "assets", data)
|
||||
return
|
||||
}
|
||||
// Pass ID for update (0 = new)
|
||||
if idStr := strings.TrimSpace(r.FormValue("id")); idStr != "" {
|
||||
if id, err := strconv.Atoi(idStr); err == nil {
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user