Skip to content

Commit

Permalink
Sobrescreve variável que contém dados do pacote com query mais nova
Browse files Browse the repository at this point in the history
  • Loading branch information
rougeth committed Jul 30, 2021
1 parent 064f8a8 commit fbb9212
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions async_routine.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ async def up_package(elem, semaphore):
if stat == 0:
return

cursor2 = await db.rastreiobot.find_one(
elem = await db.rastreiobot.find_one(
{
"code": code
})

try:
len_new_state = len(cursor2['stat'])
len_new_state = len(elem['stat'])
except:
len_new_state = 1
if len_old_state == len_new_state:
Expand Down Expand Up @@ -163,7 +163,7 @@ async def up_package(elem, semaphore):
for k in reversed(range(1,len_diff+1)):
message = (
message + '\n'
+ cursor2['stat'][len(cursor2['stat'])-k] + '\n')
+ elem['stat'][len(elem['stat'])-k] + '\n')
if 'objeto entregue' in message.lower() and user not in PATREON:
message = (message + '\n'
+ str(u'\U0001F4B3')
Expand Down

0 comments on commit fbb9212

Please sign in to comment.