|
@@ -121,16 +121,13 @@ def cron():
|
|
|
query_third = """SELECT parent FROM properties where property = ?;"""
|
|
query_third = """SELECT parent FROM properties where property = ?;"""
|
|
|
cur.execute(query_third, (item,))
|
|
cur.execute(query_third, (item,))
|
|
|
parent = cur.fetchone()['parent']
|
|
parent = cur.fetchone()['parent']
|
|
|
- if (parent):
|
|
|
|
|
- value = player_json[parent][item]
|
|
|
|
|
- else:
|
|
|
|
|
- try:
|
|
|
|
|
- value = player_json[item]
|
|
|
|
|
- except KeyError:
|
|
|
|
|
- query_fourth = """INSERT INTO properties (property, parent)
|
|
|
|
|
- VALUES (?, 'personalstats')"""
|
|
|
|
|
- cur.execute(query_fourth, (item,))
|
|
|
|
|
- value = 0
|
|
|
|
|
|
|
+ try:
|
|
|
|
|
+ if (parent):
|
|
|
|
|
+ value = player_json[parent][item]
|
|
|
|
|
+ else:
|
|
|
|
|
+ value = player_json[item]
|
|
|
|
|
+ except KeyError:
|
|
|
|
|
+ value = 0
|
|
|
print(f"item: {item} -> value: {value}")
|
|
print(f"item: {item} -> value: {value}")
|
|
|
update_missing_value(row['maintainer'], row['player'], item, value)
|
|
update_missing_value(row['maintainer'], row['player'], item, value)
|
|
|
time.sleep(1)
|
|
time.sleep(1)
|