Refactor Query.get() => Session.get() per SQLAlchemy 1.4

This commit is contained in:
Lance Edgar 2023-02-20 18:30:29 -06:00
parent eaaf437568
commit 816874cc84

View file

@ -342,7 +342,7 @@ class ExportableInvoiceView(MasterView):
invoices = []
for uuid in uuids:
invoice = self.Session.query(model.QuickbooksExportableInvoice).get(uuid)
invoice = self.Session.get(model.QuickbooksExportableInvoice, uuid)
if invoice and self.exportable(invoice):
invoices.append(invoice)
if not invoices:
@ -370,7 +370,7 @@ class ExportableInvoiceView(MasterView):
invoices = []
for uuid in uuids:
invoice = self.Session.query(model.QuickbooksExportableInvoice).get(uuid)
invoice = self.Session.get(model.QuickbooksExportableInvoice, uuid)
if invoice and self.exportable(invoice):
invoices.append(invoice)
if not invoices:
@ -399,7 +399,7 @@ class ExportableInvoiceView(MasterView):
invoices = []
for uuid in selected:
invoice = self.Session.query(model.QuickbooksExportableInvoice).get(uuid)
invoice = self.Session.get(model.QuickbooksExportableInvoice, uuid)
if invoice and invoice.status_code == invoice.STATUS_EXPORTABLE:
invoices.append(invoice)
else: