Check eligibility of using daily summaries when calculating wind vecs

Fixes problem when plotting wind vectors using database without
daily summaries.
This commit is contained in:
Tom Keffer
2023-11-17 05:41:06 -08:00
parent 21babf4343
commit 5c5d9ff2ee
2 changed files with 4 additions and 6 deletions

View File

@@ -1084,12 +1084,8 @@ class WindVecDaily(XType):
if aggregate_type not in ['avg', 'not_null']:
raise weewx.UnknownAggregation(aggregate_type)
# We cannot use the day summaries if the starting and ending times of the aggregation
# interval are not on midnight boundaries, and are not the first or last records in the
# database.
if not (isStartOfDay(timespan.start) or timespan.start == db_manager.first_timestamp) \
or not (isStartOfDay(timespan.stop) or timespan.stop == db_manager.last_timestamp):
raise weewx.UnknownAggregation(aggregate_type)
# Check to see whether we can use the daily summaries:
DailySummaries._check_eligibility('wind', timespan, db_manager, aggregate_type)
if aggregate_type == 'not_null':
# Aggregate type 'not_null' is actually run against 'wind'.

View File

@@ -8,6 +8,8 @@ Image.ANTIALIAS were deprecated in Pillow 9.2 (1-Jul-2022), then removed in
Pillow 10.0 (1-Jul-2023). Replaces them with alternatives. Fixes issue
#884.
Fixed problem when plotting wind vectors using database without daily summaries.
4.10.2 02/22/2023