mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
PromoteReport: exclude end hour to avoid double counting.
This commit is contained in:
@@ -3982,6 +3982,11 @@ class PromoteReport(Templated):
|
||||
codenames = campaigns_by_name.keys()
|
||||
start = (start - promote.timezone_offset).replace(tzinfo=None)
|
||||
end = (end - promote.timezone_offset).replace(tzinfo=None)
|
||||
|
||||
# start and end are dates so we need to subtract an hour from end to
|
||||
# only include 24 hours per day
|
||||
end -= datetime.timedelta(hours=1)
|
||||
|
||||
hits = traffic_cls.campaign_history(codenames, start, end)
|
||||
sr_hits = defaultdict(int)
|
||||
fp_hits = defaultdict(int)
|
||||
|
||||
Reference in New Issue
Block a user