invoice reindex use hex

This commit is contained in:
cryptosharks131 2026-04-30 21:15:25 -04:00
parent 564156029c
commit 7f85763eba
No known key found for this signature in database
GPG key ID: 0A50748567ADEB28

View file

@ -177,11 +177,11 @@ def update_invoices(stub):
invoices = resp.invoices
for i in invoices:
try:
db_invoice = Invoices.objects.get(r_hash=i.r_hash)
db_invoice = Invoices.objects.get(r_hash=i.r_hash.hex())
db_invoice.index = i.add_index
db_invoice.save()
except Invoices.DoesNotExist:
logger.warning(f'Invoice not found during reindex: {i.r_hash}')
logger.warning(f'Invoice not found during reindex: {i.r_hash.hex()}')
index_offset = resp.last_index_offset
if len(invoices) < page_size:
break