mirror of
https://github.com/owntracks/recorder.git
synced 2026-08-27 16:57:21 +00:00
FIX: ocat: CSV output now correctly handles non-existent fields in output (e.g. pressure)
This commit is contained in:
@@ -100,6 +100,9 @@ void csv_output(JsonNode *json, output_type otype, JsonNode *fields)
|
||||
if ((j = json_find_member(one, node->string_)) != NULL) {
|
||||
print_one(j, inttypes);
|
||||
printf("%c", node->next ? ',' : '\n');
|
||||
} else {
|
||||
/* specified field not in JSON for this row */
|
||||
printf("%c", node->next ? ',' : '\n');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user