Skip to content

Commit

Permalink
Fixed a Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Moulishankar10 committed Dec 5, 2020
1 parent 0618f37 commit c678636
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def enqueue(self,ele,qn):
flag1 = 0
flag2 = 0
for i in range(len(inv_data)):
flag1 = flag2 = 0
if inv_data["Product_Name"][i]==ele.upper():
if qn.isnumeric() == True:
if int(qn) <= inv_data["Available_Stock"][i]:
Expand All @@ -136,7 +137,7 @@ def enqueue(self,ele,qn):
flag2 = 1
else:
flag1 += 1
if flag1 != 0 and flag2 == 0:
if flag1 != 0:
print("\n!! Sorry for the inconvenience... Your required product is either Out of Stock or Not in our Stock !!")
if flag2 != 0:
print("\n!! Invalid Amount of Quantity !!")
Expand Down

0 comments on commit c678636

Please sign in to comment.