|
@@ -118,18 +118,18 @@ def cron():
|
|
|
if len(new_properties) > 0:
|
|
if len(new_properties) > 0:
|
|
|
print(f"len(new_properties): {len(new_properties)}")
|
|
print(f"len(new_properties): {len(new_properties)}")
|
|
|
for item in new_properties:
|
|
for item in new_properties:
|
|
|
- if item == 'tokenrefills':
|
|
|
|
|
- # Weird error
|
|
|
|
|
- continue
|
|
|
|
|
- if item == 'incendiaryammoused':
|
|
|
|
|
- continue
|
|
|
|
|
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):
|
|
if (parent):
|
|
|
value = player_json[parent][item]
|
|
value = player_json[parent][item]
|
|
|
else:
|
|
else:
|
|
|
- value = player_json[item]
|
|
|
|
|
|
|
+ try:
|
|
|
|
|
+ value = player_json[item]
|
|
|
|
|
+ except KeyError:
|
|
|
|
|
+ query_fourth = """INSERT INTO properties (property, parent)
|
|
|
|
|
+ VALUES (?, 'personalstats')"""
|
|
|
|
|
+ cur.execute(query_fourth, (item,))
|
|
|
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)
|