From 459ccb1309df776cfea9fc84549b76166cbeaf94 Mon Sep 17 00:00:00 2001 From: Matthew Wall Date: Wed, 17 Apr 2019 00:02:48 -0400 Subject: [PATCH] some uploaders do not need to augment records, so they should not have to override get_record in order to avoid an attempt to dereference a None --- bin/weewx/restx.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/weewx/restx.py b/bin/weewx/restx.py index a6a59d8c..646715d4 100644 --- a/bin/weewx/restx.py +++ b/bin/weewx/restx.py @@ -244,6 +244,10 @@ class RESTThread(threading.Thread): returns: A dictionary of weather values""" + # this will not work without a dbmanager + if dbmanager is None: + return record + _time_ts = record['dateTime'] _sod_ts = weeutil.weeutil.startOfDay(_time_ts)