Skip to content

Commit

Permalink
index is already int
Browse files Browse the repository at this point in the history
  • Loading branch information
madanalogy committed Nov 13, 2023
1 parent 503e897 commit 327073f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def run_list(chat_id):


def run_detail(chat_id, text):
print("Received detail index:", int(text))
print("Received detail index:", text)
if not text or int(text) < 1:
return constants.ERROR_GENERIC
transactions = get_transactions(chat_id)
Expand Down Expand Up @@ -193,7 +193,7 @@ def get_at(transactions, index):
docs = transactions.order_by("timestamp").stream()
counter = 1
for doc in docs:
if int(index) == counter:
if index == counter:
return doc.id, doc.to_dict()
counter += 1
return 0, {}

0 comments on commit 327073f

Please sign in to comment.