Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update acceptation from develop #639

Merged
merged 7 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion fetc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
MENU_HIDE_EMPTY = False

# Base URL
BASE_URL = "127.0.0.1:8000"
BASE_URL = "https://127.0.0.1:8000"

# CSRF Setting
CSRF_FAILURE_VIEW = "main.error_views.csrf_failure"
Expand Down
2 changes: 1 addition & 1 deletion proposals/utils/pdf_diff_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def create_unordered_html_list(self, lst):
def handle_field_file(self, field_file):
if field_file:
output = format_html(
"<a href=https://{}>{}</a>",
'<a href="{}">{}</a>',
f"{settings.BASE_URL}{field_file.url}",
_("Download"),
)
Expand Down
1 change: 1 addition & 0 deletions reviews/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def update_go(self, last_decision=None):

start_assignment_phase(self.proposal)
self.stage = self.Stages.CLOSED
self.save()
# On NO-GO, reset the Proposal status
else:
# See comment above
Expand Down
11 changes: 8 additions & 3 deletions reviews/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def get_context_data(self, **kwargs):

def get_committee_decisions(self):
decisions = Decision.objects.filter(
review__proposal__reviewing_committee=self.committee
review__proposal__reviewing_committee=self.committee,
review__is_committee_review=True,
).select_related(
"reviewer",
"review",
Expand All @@ -159,11 +160,15 @@ def get_review_counts_last_year(self):

decisions = self.get_committee_decisions()

# This is done to include in the base_filter, decisions which are taken
# today. The comparison was having some troubles due to different
# time formats.
end_date = self.end_date + timedelta(days=1)

reviewers = get_user_model().objects.filter(decision__in=decisions)
base_filter = Q(
decision__review__date_start__gt=self.start_date,
decision__review__date_start__lt=self.end_date,
decision__review__stage__gt=Review.Stages.SUPERVISOR,
decision__review__date_start__lte=end_date,
)
return reviewers.annotate(
total=Count("decision", filter=base_filter),
Expand Down
Loading