Пример #1
0
 def find_invoice_by_id(self, invoice_id):
     """ Find an invoice entity by its id """
     invoice = InvoiceEntity.get_by_id(invoice_id)
     if invoice is not None:
         # If the invoice belongs to another user, set the result to None
         if invoice.user.key() != self._user.key():
             invoice = None
 
     return invoice