0

I am a newbie and confused with the nextOrderId. In the testing code I have the following:

order_id = self.nextValidOrderId
print('order_id', order_id)
next_order_id = self.nextOrderId()
print('next_order_id', next_order_id)

But the response puzzles me:

order_id 1
AttributeError                            Traceback (most recent call last)
...
    140 order_id = self.nextValidOrderId
    141 print('order_id', order_id)
--> 142 next_order_id = self.nextOrderId()
    143 print('next_order_id', next_order_id)
...
AttributeError: 'App' object has no attribute 'nextValidOderId'

In the class I have the standard "def nextValidId" and "def nextOrderId":

def nextValidId(self, orderId: int):
    super().nextValidId(orderId)
    self.nextValidOrderId = orderId
    print("NextValidOrderId: ", orderId)
    self.start()

def nextOrderId(self):
    oid = self.nextValidOrderId
    self.nextValidOderId += 1
    return oid

How is the self.nextValidOrderId became "lost"?

Thank you very much for you help in advance.

alex-mon888
  • 51
  • 1
  • 7

0 Answers0