two bugs here: - accidently comparing with == instead != against error - using return instead of continue during for loop
This commit is contained in:
@@ -182,8 +182,9 @@ func (rc *printController) PrintHandler(c *gin.Context) {
|
|||||||
for _, printJob := range printJobs {
|
for _, printJob := range printJobs {
|
||||||
err := printJob.Execute()
|
err := printJob.Execute()
|
||||||
|
|
||||||
if err == nil {
|
if err != nil {
|
||||||
return
|
fmt.Printf("Error: %s\n", err)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
printJob.ShopItem.WasPrinted = true
|
printJob.ShopItem.WasPrinted = true
|
||||||
@@ -192,7 +193,6 @@ func (rc *printController) PrintHandler(c *gin.Context) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error: %s\n", err)
|
fmt.Printf("Error: %s\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user