# HG changeset patch # User Dennis Fink # Date 2015-08-30 15:15:19 # Node ID bfe9206037615f2e1b8a126d122bcdde35059eeb # Parent 56d6218e631e4a4f6ec009a509f30e0c82feaba3 Use Server.from_dict instead of Server.from_json diff --git a/ennstatus/api/views.py b/ennstatus/api/views.py --- a/ennstatus/api/views.py +++ b/ennstatus/api/views.py @@ -1,5 +1,4 @@ import ipaddress -import json from datetime import datetime @@ -70,7 +69,7 @@ def update(): ) try: - server = Server.from_json(json.dumps(data)) + server = Server.from_dict(data) except Exception as e: current_app.logger.warning(' '.join([str(e), str(data)])) return str(e), 409, {'Content-Type': 'text/plain'}