[Change] fix NameError

master
Marcel Eggert 3 years ago
parent fc6fc9ee71
commit 45ee647772
  1. 6
      bannerDiscovery.py

@ -434,8 +434,6 @@ def getPhoto(update: Update, context: CallbackContext) -> int:
def verarbeitung(update: Update, context: CallbackContext):
user = update.message.from_user
agent = loadAgentConfig(user)
if daten[user.username]['type'] == "JSON":
@ -446,7 +444,7 @@ def verarbeitung(update: Update, context: CallbackContext):
daten[user.username]['bannerInfos']['formattedAddress'] = getFormattedAddress(daten[user.username]['bannerInfos']['startLatitude'], daten[user.username]['bannerInfos']['startLongitude'])
if daten[user.username]['bannerInfos']['completed'] is None:
daten[user.username]['bannerInfos']['completed'] = int(agent['completed-mission']) + int(daten[user.username]['bannerInfos']['missions'])
uploadJsonToGDrive(daten)
uploadJsonToGDrive(user, daten)
if daten[user.username]['type'] == "LINK":
@ -503,7 +501,7 @@ def verarbeitung(update: Update, context: CallbackContext):
with open(f'agent-{user.username}.json', 'w', encoding='utf-8') as f:
json.dump(agent, f, ensure_ascii=False, indent=4)
def uploadJsonToGDrive(daten):
def uploadJsonToGDrive(user, daten):
import requests
import time

Loading…
Cancel
Save