Foppe Hemminga 5 anni fa
parent
commit
3d5935c4b6
1 ha cambiato i file con 1 aggiunte e 4 eliminazioni
  1. 1 4
      cron.py

+ 1 - 4
cron.py

@@ -106,10 +106,7 @@ def cron():
             for item in new_properties:
                 query = """SELECT parent FROM properties where property = ?;"""
                 cur.execute(query, (item,))
-                row = cur.fetchone()
-                parent = ''
-                if len(row) > 0:
-                    parent = row['parent']
+                parent = cur.fetchone()['parent']
                 if (parent):
                     value = player_json[parent][item]
                 else: