fix #12 edit item without pdf removew preview image
All checks were successful
Go / build (push) Successful in 12m20s

This commit is contained in:
2025-04-14 01:05:51 +02:00
parent d839416fdd
commit 202c845bee

View File

@@ -457,8 +457,15 @@ func (rc *shopItemController) EditItemHandler(c *gin.Context) {
newShopItem.BasePrice = shopItem.BasePrice newShopItem.BasePrice = shopItem.BasePrice
newShopItem.IsPublic = shopItem.IsPublic newShopItem.IsPublic = shopItem.IsPublic
newShopItem.Tags = shopItem.Tags newShopItem.Tags = shopItem.Tags
if shopItem.Image != "static/img/zine.jpg" {
newShopItem.Image = shopItem.Image newShopItem.Image = shopItem.Image
}
if shopItem.Pdf != "" {
newShopItem.Pdf = shopItem.Pdf newShopItem.Pdf = shopItem.Pdf
}
newShopItem.PrintMode = shopItem.PrintMode newShopItem.PrintMode = shopItem.PrintMode
tags, err := repositories.Tags.GetAll() tags, err := repositories.Tags.GetAll()