Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into odt/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
asvishnyakov committed Aug 14, 2020
2 parents b368a3e + 49fcd2f commit 8896143
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ public virtual bool IsSatisfiedBy(long requestedQuantity)
if (result && _product.TrackInventory)
{
result = _product.Inventory != null &&
_product.AvailableQuantity +
(Convert.ToInt32(_product.Inventory.AllowPreorder) * _product.Inventory.PreorderQuantity) +
(Convert.ToInt32(_product.Inventory.AllowBackorder) * _product.Inventory.BackorderQuantity)
>= requestedQuantity;
_product.AvailableQuantity +
(Convert.ToInt32(_product.Inventory.AllowPreorder) * Convert.ToInt32(_product.Inventory.PreorderQuantity)) +
(Convert.ToInt32(_product.Inventory.AllowBackorder) * Convert.ToInt32(_product.Inventory.BackorderQuantity))
>= requestedQuantity;
}

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public virtual bool IsSatisfiedBy(Product product)
{
result = product.Inventory != null &&
product.AvailableQuantity +
(Convert.ToInt32(product.Inventory.AllowPreorder) * product.Inventory.PreorderQuantity) +
(Convert.ToInt32(product.Inventory.AllowBackorder) * product.Inventory.BackorderQuantity)
(Convert.ToInt32(product.Inventory.AllowPreorder) * Convert.ToInt32(product.Inventory.PreorderQuantity)) +
(Convert.ToInt32(product.Inventory.AllowBackorder) * Convert.ToInt32(product.Inventory.BackorderQuantity))
> 0;
}
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override void OnResultExecuting(ResultExecutingContext context)
if (context.Result is ViewResult viewResult && statusCodeReExecuteFeature == null)
{
var tokens = antiforgery.GetAndStoreTokens(context.HttpContext);
context.HttpContext.Response.Cookies.Append("XSRF-TOKEN", tokens.RequestToken, new CookieOptions() { HttpOnly = false, IsEssential = true });
context.HttpContext.Response.Cookies.Append("XSRF-TOKEN", tokens.RequestToken, new CookieOptions() { HttpOnly = false, IsEssential = true, SameSite = SameSiteMode.Lax });
}
}

Expand Down

0 comments on commit 8896143

Please sign in to comment.