mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-20 21:54:23 +01:00
Remove CurrentRefund property in InvoiceData (#5494)
This commit is contained in:
@@ -233,9 +233,6 @@ namespace BTCPayServer.Hosting
|
||||
var rows = await query.ToListAsync();
|
||||
foreach (var row in rows)
|
||||
{
|
||||
// There is as circular deps between invoice and refund.
|
||||
if (row is InvoiceData id)
|
||||
id.CurrentRefundId = null;
|
||||
foreach (var prop in datetimeProperties)
|
||||
{
|
||||
var v = (DateTime)prop.GetValue(row)!;
|
||||
@@ -262,10 +259,6 @@ namespace BTCPayServer.Hosting
|
||||
await postgresContext.SaveChangesAsync();
|
||||
postgresContext.ChangeTracker.Clear();
|
||||
}
|
||||
foreach (var invoice in otherContext.Invoices.AsNoTracking().Where(i => i.CurrentRefundId != null))
|
||||
{
|
||||
postgresContext.Entry(invoice).State = EntityState.Modified;
|
||||
}
|
||||
await postgresContext.SaveChangesAsync();
|
||||
postgresContext.ChangeTracker.Clear();
|
||||
await UpdateSequenceInvoiceSearch(postgresContext);
|
||||
|
||||
Reference in New Issue
Block a user