Parcourir la source

[json] Inversion of memberCount and subscriberCount

Sebastien Badia il y a 11 ans
Parent
commit
8127577ac9
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      adhcount-json.py

+ 2 - 2
adhcount-json.py

@@ -12,10 +12,10 @@ connection = MySQLdb.connect(host = "localhost", user = "user", passwd = "passwo
 cursor = connection.cursor()
 cursor.execute("SELECT COUNT(*) FROM llx_adherent WHERE statut = '1'")
 row = cursor.fetchone()
-data['subscriberCount'] = row[0]
+data['memberCount'] = row[0]
 cursor.execute("SELECT COUNT(*) FROM llx_societe WHERE status = '1' AND client='1'")
 row = cursor.fetchone()
-data['memberCount'] = row[0]
+data['subscriberCount'] = row[0]
 
 with open(info, 'w') as outfile:
   json.dump(data, outfile)