Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,7 @@ def _fill_daily_pageproject_aggregates(self, change_number, collection, link_eve
link_event["fields"]["timestamp"]
).date(),
on_user_list=link_event['fields']["on_user_list"],
).exclude(day=0)[:1].all()
existing_pageproject_aggregate = (
existing_pageproject_aggregate[0] if len(existing_pageproject_aggregate) > 0 else None
)
).exclude(day=0).first()
if existing_pageproject_aggregate:
if change_number == 0:
existing_pageproject_aggregate.total_links_removed += 1
Expand Down Expand Up @@ -570,7 +567,7 @@ def _fill_monthly_page_project_aggregates(self, collection, events, last_day_of_
day=0,
full_date=last_day_of_month,
on_user_list=on_user_list_flag,
)[:1].all()
).first()
if existing_page_project_aggregate:
existing_page_project_aggregate.total_links_added = total_added_page_project
existing_page_project_aggregate.total_links_removed = total_removed_page_project
Expand Down