Fixed not required field initialization when GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING is disabled (references #1202 )

This commit is contained in:
Bernd Bestel 2020-12-21 10:52:40 +01:00
parent 01306bc1ae
commit e62994eb4a
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300

View File

@ -314,7 +314,7 @@ if (Grocy.Components.ProductPicker !== undefined)
Grocy.Components.ProductAmountPicker.SetQuantityUnit(barcode.qu_id);
}
if (barcode.shopping_location_id != null)
if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING && barcode.shopping_location_id != null)
{
Grocy.Components.ShoppingLocationPicker.SetId(barcode.shopping_location_id);
}