mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
parent
c6d44e7a89
commit
a500a89138
1 changed files with 1 additions and 9 deletions
|
@ -52,8 +52,7 @@ namespace BTCPayServer.Services.Invoices
|
||||||
ctx.PendingInvoices.Remove(new PendingInvoiceData() { Id = invoiceId });
|
ctx.PendingInvoices.Remove(new PendingInvoiceData() { Id = invoiceId });
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (await ctx.SaveChangesAsync() == 0)
|
await ctx.SaveChangesAsync();
|
||||||
return false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (DbUpdateException) { return false; }
|
catch (DbUpdateException) { return false; }
|
||||||
|
@ -509,13 +508,6 @@ namespace BTCPayServer.Services.Invoices
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (context.Database.ProviderName == "Microsoft.EntityFrameworkCore.Sqlite")
|
|
||||||
{
|
|
||||||
if (await context.Payments.AnyAsync(p => p.Id == paymentData.GetPaymentId()))
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (await context.SaveChangesAsync().ConfigureAwait(false) == 0)
|
if (await context.SaveChangesAsync().ConfigureAwait(false) == 0)
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue