Skip to content

Commit

Permalink
Fix displaying Tags on Highcharts Widget
Browse files Browse the repository at this point in the history
  • Loading branch information
kizniche committed Jun 6, 2024
1 parent f230afb commit fa11b9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This release changes the install directory from ~/Mycodo to /opt/Mycodo. This ne
- Fix note attachments not being copied during upgrade
- Fix display of values <=0 in PID Widget ([#1372](https://github.com/kizniche/Mycodo/issues/1372))
- Fix MCP23017 Pump Output KeyError
- Fix displaying Tags on Highcharts Widget

### Features

Expand Down
3 changes: 2 additions & 1 deletion mycodo/widgets/widget_graph_synchronous.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from flask import jsonify
from flask_babel import lazy_gettext
from flask_login import current_user
from pytz import timezone

from mycodo.config import THEMES_DARK
from mycodo.databases.models import Conversion
Expand Down Expand Up @@ -69,7 +70,7 @@ def past_data(unique_id, measure_type, measurement_id, past_seconds):
for each_note in notes:
if tag.unique_id in each_note.tags.split(','):
notes_list.append(
[each_note.date_time.strftime("%Y-%m-%dT%H:%M:%S.000000000Z"), each_note.name, each_note.note])
[each_note.date_time.replace(tzinfo=timezone('UTC')).timestamp(), each_note.name, each_note.note])

if notes_list:
return jsonify(notes_list)
Expand Down

1 comment on commit fa11b9c

@kizniche
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Radical DIY Forum. There might be relevant details there:

https://forum.radicaldiy.com/t/notes-not-showing-in-graph/1885/4

Please sign in to comment.