Skip to content

Commit

Permalink
Remove bver field
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelsr committed Jul 6, 2020
1 parent 7c996d4 commit 5adf501
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion toad_influx_query/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from json import loads, dumps
import senml
from aioinflux import iterpoints
from toad_influx_query import logger
Expand Down Expand Up @@ -47,7 +48,12 @@ def influx_response_to_senml(query: Query, response):
logger.log_info_verbose(
f"Influx to SenML:{senml.SenMLDocument.from_json(senml_meaurements).to_json()}"
)
return senml.SenMLDocument.from_json(senml_meaurements).to_json()
# delete "bver" field
result = senml.SenMLDocument.from_json(senml_meaurements).to_json()
first = result[0]
del first["bver"]
result[0] = first
return result


def publish_response(mqtt_client, topic, senml_data):
Expand Down

0 comments on commit 5adf501

Please sign in to comment.