This commit is contained in:
Eriks K 2020-07-09 18:51:00 +03:00
parent 0531c8997b
commit 1f21a71c74

View File

@ -548,8 +548,10 @@ class Reporter:
if self.__to_update: if self.__to_update:
for unreported_data in self.__to_update: for unreported_data in self.__to_update:
unreported_data.update(player_id=self.citizen_id, key=self.key) unreported_data.update(player_id=self.citizen_id, key=self.key)
unreported_data = utils.json.load(utils.json.dumps(unreported_data, cls=MyJSONEncoder, sort_keys=True))
self._req.post("{}/bot/update".format(self.url), json=unreported_data) self._req.post("{}/bot/update".format(self.url), json=unreported_data)
self.__to_update.clear() self.__to_update.clear()
data = utils.json.load(utils.json.dumps(data, cls=MyJSONEncoder, sort_keys=True))
r = self._req.post("{}/bot/update".format(self.url), json=data) r = self._req.post("{}/bot/update".format(self.url), json=data)
return r return r