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

2024-08-30 | MAIN --> PROD | DEV (dffbf33) --> STAGING #4244

Merged
merged 3 commits into from
Aug 30, 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
20 changes: 6 additions & 14 deletions backend/audit/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from django.utils.translation import gettext_lazy as _
from django.utils import timezone as django_timezone

from django_fsm import FSMField, RETURN_VALUE, transition
from django_fsm import FSMField, transition

import audit.cross_validation
from audit.cross_validation.naming import SECTION_NAMES
Expand Down Expand Up @@ -505,23 +505,15 @@ def validate_individually(self):
@transition(
field="submission_status",
source=STATUS.IN_PROGRESS,
target=RETURN_VALUE(STATUS.IN_PROGRESS, STATUS.READY_FOR_CERTIFICATION),
target=STATUS.READY_FOR_CERTIFICATION,
)
def transition_to_ready_for_certification(self):
"""
Pretend we're doing multi-sheet validation here.
This probably won't be the first time this validation is done;
there's likely to be a step in one of the views that does cross-sheet
validation and reports back to the user.
The permission checks verifying that the user attempting to do this has
the appropriate privileges will be done at the view level.
"""
errors = self.validate_full()
if not errors:
self.transition_name.append(
SingleAuditChecklist.STATUS.READY_FOR_CERTIFICATION
)
self.transition_date.append(datetime.now(timezone.utc))
return SingleAuditChecklist.STATUS.READY_FOR_CERTIFICATION
return SingleAuditChecklist.STATUS.IN_PROGRESS
self.transition_name.append(SingleAuditChecklist.STATUS.READY_FOR_CERTIFICATION)
self.transition_date.append(datetime.now(timezone.utc))

@transition(
field="submission_status",
Expand Down
12 changes: 7 additions & 5 deletions backend/audit/views/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,13 @@ def post(self, request, *args, **kwargs):
event_type=SubmissionEvent.EventType.LOCKED_FOR_CERTIFICATION,
)
return redirect(reverse("audit:SubmissionProgress", args=[report_id]))

context = {"report_id": report_id, "errors": errors}
return render(
request, "audit/cross-validation/cross-validation-results.html", context
)
else:
context = {"report_id": report_id, "errors": errors}
return render(
request,
"audit/cross-validation/cross-validation-results.html",
context,
)

except SingleAuditChecklist.DoesNotExist:
raise PermissionDenied("You do not have access to this audit.")
Expand Down
8 changes: 4 additions & 4 deletions backend/dissemination/templates/search-alert-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
<h2 class="usa-alert__heading">Searching the FAC database</h2>
{% if advanced_search_flag %}
<p class="usa-alert__text padding-bottom-2">
Learn more about how our advanced search flters work on <a href='https://www.fac.gov/search-resources/advanced/' target='_blank'>our resources page</a>.
Learn more about how our advanced search filters work on <a href='https://www.fac.gov/search-resources/advanced/' target='_blank'>our resources page</a>.
</p>
{% else %}
<p class="usa-alert__text padding-bottom-2">
Learn more about how our search flters work on <a href='https://www.fac.gov/search-resources/filters/' target='_blank'>our resources page</a>.
Learn more about how our search filters work on <a href='https://www.fac.gov/search-resources/filters/' target='_blank'>our resources page</a>.
</p>
{% endif %}

<h2 class="usa-alert__heading">Summary reports</h2>
<p class="usa-alert__text padding-bottom-2">
For search results of {{ summary_report_download_limit|intcomma }} submissions or less, you can download a combined spreadsheet of all data.
For search results of {{ summary_report_download_limit|intcomma }} submissions or less, you can download a combined spreadsheet of all data.
If you need to download more than {{ summary_report_download_limit|intcomma }} submissions, try limiting your search parameters to download in batches.
</p>

{% if advanced_search_flag %}
<h2 class="usa-alert__heading">Basic search</h2>
<p class="usa-alert__text">
Expand Down
Loading
Loading