diff --git a/library/kernel.application.pas b/library/kernel.application.pas index 088136e..5719b05 100644 --- a/library/kernel.application.pas +++ b/library/kernel.application.pas @@ -143,7 +143,7 @@ function TLidlToGrocy.AddNewGrocyProduct(LidlProduct: TItemsLine): TGrocyProduct try TLogger.Info('Insert product %s in Grocy', [OFFProductInfo.ProductName]); - if (NoProductPicture) then + if not (NoProductPicture) then InsertOFFImageInGrocy(OFFProductInfo); GrocyProduct := FGrocyService.CreateProduct(OFFProductInfo); diff --git a/service/grocy.service.pas b/service/grocy.service.pas index 4708bca..1f630a6 100644 --- a/service/grocy.service.pas +++ b/service/grocy.service.pas @@ -68,7 +68,7 @@ function TGrocyService.CreateGrocyProduct(const OFFProductInfo: TOFFProductInfo) GrocyProduct.DefaultSetup(); GrocyProduct.Name := OFFProductInfo.ProductName; - if (OFFProductInfo.Code <> '') then + if (OFFProductInfo.ImageUrl <> '') then GrocyProduct.PictureFileName := OFFProductInfo.Code + '.jpg'; with FConfiguration do