fix #12 edit item without pdf removew preview image
All checks were successful
Go / build (push) Successful in 12m20s
All checks were successful
Go / build (push) Successful in 12m20s
This commit is contained in:
@@ -457,8 +457,15 @@ func (rc *shopItemController) EditItemHandler(c *gin.Context) {
|
||||
newShopItem.BasePrice = shopItem.BasePrice
|
||||
newShopItem.IsPublic = shopItem.IsPublic
|
||||
newShopItem.Tags = shopItem.Tags
|
||||
newShopItem.Image = shopItem.Image
|
||||
newShopItem.Pdf = shopItem.Pdf
|
||||
|
||||
if shopItem.Image != "static/img/zine.jpg" {
|
||||
newShopItem.Image = shopItem.Image
|
||||
}
|
||||
|
||||
if shopItem.Pdf != "" {
|
||||
newShopItem.Pdf = shopItem.Pdf
|
||||
}
|
||||
|
||||
newShopItem.PrintMode = shopItem.PrintMode
|
||||
|
||||
tags, err := repositories.Tags.GetAll()
|
||||
|
||||
Reference in New Issue
Block a user