aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--bin/online_duration.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/online_duration.py b/bin/online_duration.py
index f074b08..5ddb34a 100644
--- a/bin/online_duration.py
+++ b/bin/online_duration.py
@@ -93,6 +93,10 @@ class OutputConverterJSON:
_WEEKDAY_FIELD = 'weekday'
_HOUR_FIELD = 'hour'
+ assert _DATE_FIELD not in map(str, _OUTPUT_USER_FIELDS)
+ assert _WEEKDAY_FIELD not in map(str, _OUTPUT_USER_FIELDS)
+ assert _HOUR_FIELD not in map(str, _OUTPUT_USER_FIELDS)
+
@staticmethod
def convert_user(user):
obj = OrderedDict()
@@ -124,6 +128,8 @@ class OutputWriterJSON:
_DURATION_FIELD = 'duration'
+ assert _DURATION_FIELD not in map(str, _OUTPUT_USER_FIELDS)
+
_CONVERT_KEY = {
Grouping.USER: OutputConverterJSON.convert_user,
Grouping.DATE: OutputConverterJSON.convert_date,