[perf-web] Fix retrieved date range when no summaries were saved
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perf-web] Fix retrieved date range when no summaries were saved
- Date: Wed, 23 Jul 2014 00:36:53 +0000 (UTC)
commit fb73a899f6410743abb8eeaf3035610ff392509e
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Jun 29 10:59:07 2014 -0400
Fix retrieved date range when no summaries were saved
When no summaries were saved, we always retrieved data from the
beginning of time, without attention to what was passed in.
metrics/models.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/metrics/models.py b/metrics/models.py
index 123cfe5..1e81df4 100644
--- a/metrics/models.py
+++ b/metrics/models.py
@@ -85,7 +85,12 @@ class Summary(models.Model):
result = list(qs)
- cls._do_summarize(start=cls.last_summary_end(),
+ if start_truncated is not None:
+ last_summary_end = cls.last_summary_end()
+ if last_summary_end is not None:
+ start_truncated = max(start_truncated, last_summary_end)
+
+ cls._do_summarize(start=start_truncated,
end=end_truncated,
target=target,
metric=metric,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]