Changeset - 632c4f992443
[Not reviewed]
default
0 1 0
Dennis Fink - 10 years ago 2015-07-08 22:23:53

decode early
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
spaceapi/sensors.py
Show inline comments
 
@@ -74,9 +74,9 @@ def set_radiation_value(data):
 
def set_sensors(key):
 

	
 
    if key in ALLOWED_SENSORS_KEYS and key in active_json['sensors']:
 
        data = request.data
 
        data = request.data.decode('utf-8')
 
        try:
 
            data = json.loads(data.decode('utf-8'))
 
            data = json.loads(data)
 

	
 
            try:
 
                jsonschema.validate(data, ALLOWED_SENSORS_KEYS[key])
0 comments (0 inline, 0 general)