Fix SQLite bug: New invoice repeating

This commit is contained in:
nicolas.dorier 2018-03-29 11:56:30 +09:00
parent 9355454953
commit 9eb3aad072

View file

@ -508,7 +508,8 @@ namespace BTCPayServer.Services.Invoices
try
{
await context.SaveChangesAsync().ConfigureAwait(false);
if (await context.SaveChangesAsync().ConfigureAwait(false) == 0)
return null;
}
catch(DbUpdateException) { return null; } // Already exists
AddToTextSearch(invoiceId, paymentData.GetSearchTerms());