mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Fix potential crash on migration
This commit is contained in:
@@ -237,6 +237,8 @@ namespace BTCPayServer.Hosting
|
|||||||
var stores = await ctx.Stores.ToArrayAsync();
|
var stores = await ctx.Stores.ToArrayAsync();
|
||||||
foreach (var store in stores)
|
foreach (var store in stores)
|
||||||
{
|
{
|
||||||
|
if (store.StoreBlob is null)
|
||||||
|
continue;
|
||||||
var blob = JObject.Parse(store.StoreBlob);
|
var blob = JObject.Parse(store.StoreBlob);
|
||||||
var array = blob["excludedPaymentMethods"] as JArray;
|
var array = blob["excludedPaymentMethods"] as JArray;
|
||||||
if (array is null || array.Count == 0)
|
if (array is null || array.Count == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user