Commit f68cb5c5 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

admin data download fixed

parent 6ad51f9e
...@@ -474,15 +474,17 @@ def administration_user_application_device_download_csv(name, appkey, devid): ...@@ -474,15 +474,17 @@ def administration_user_application_device_download_csv(name, appkey, devid):
with open(app.config['DATA_DOWNLOAD_DIR_OS']+'/'+fn, 'w+') as f: with open(app.config['DATA_DOWNLOAD_DIR_OS']+'/'+fn, 'w+') as f:
f.write('utc,timestamp,') f.write('utc,timestamp,')
print(dev)
for d in dev[3]['format']: for d in dev[3]['format']:
f.write(d) f.write(d)
f.write(',') f.write(',')
f.write('\n') f.write('\n')
for row in dumpd[1]: for row in dumpd[1]:
f.write('{},{},'.format(row[0],row[1])) f.write('{},{},'.format(row[0],row[1]))
for v in row[2]: decoded = ddm.read_data(row[2].tobytes(), dev[3])
f.write(str(row[2][v])) for k, v in decoded.items():
f.write(str(v))
f.write(',') f.write(',')
f.write('\n') f.write('\n')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment