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 {
|
||||
err := printJob.Execute()
|
||||
|
||||
if err == nil {
|
||||
return
|
||||
if err != nil {
|
||||
fmt.Printf("Error: %s\n", err)
|
||||
continue
|
||||
}
|
||||
|
||||
printJob.ShopItem.WasPrinted = true
|
||||
@@ -192,7 +193,6 @@ func (rc *printController) PrintHandler(c *gin.Context) {
|
||||
if err != nil {
|
||||
fmt.Printf("Error: %s\n", err)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user