Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix null in daily log data #1993

Merged
merged 2 commits into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/helpermodules/measurement_logging/write_log.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from enum import Enum
import json
import logging
from math import isnan
from pathlib import Path
import re
import string
Expand Down Expand Up @@ -263,7 +264,9 @@ def find_and_fix_value(value_name):
if value.get(value_name) is not None:
if value[value_name] == 0:
try:
value[value_name] = previous_entry[group][component][value_name]
if (previous_entry[group][component][value_name] is not None and
isnan(previous_entry[group][component][value_name]) is False):
value[value_name] = previous_entry[group][component][value_name]
except KeyError:
log.exception("Es konnte kein vorheriger Wert gefunden werden.")
if previous_entry is not None:
Expand Down