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

2023-10-14 | MAIN --> PROD | DEV (52b303d) --> STAGING #2500

Merged
merged 5 commits into from
Oct 14, 2023
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
9 changes: 0 additions & 9 deletions backend/audit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,15 +569,6 @@ def get_transition_date(self, status):
return self.transition_date[index]
return None

def _general_info_get(self, key):
try:
return self.general_information[key]
except KeyError:
pass
except TypeError:
pass
return None


class AccessManager(models.Manager):
"""Custom manager for Access."""
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/viewlib/upload_report_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def get(self, request, *args, **kwargs):
report_id = kwargs["report_id"]
try:
sac = SingleAuditChecklist.objects.get(report_id=report_id)
sar = SingleAuditReportFile.objects.filter(sac_id=sac.id).first()
sar = SingleAuditReportFile.objects.filter(sac_id=sac.id)
if sar.exists():
sar = sar.latest("date_created")

current_info = {
"cleaned_data": getattr(sar, "component_page_numbers", {}),
Expand Down
12 changes: 7 additions & 5 deletions backend/cypress/e2e/check-ueid.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ describe('Create New Audit', () => {
);
});

it('should show an error if the user enters a date before 1/1/2020', () => {
cy.get('#auditee_fiscal_period_start').type('12/31/2019');
it('should show an error if the user enters a date before 1/1/2016', () => {
cy.get('#auditee_fiscal_period_start').type('12/31/2015');
cy.get('#fy-error-message li').should('have.length', 1);
});

it('should not show an error if the user enters a date after 12/31/2019', () => {
cy.get('#auditee_fiscal_period_start').clear().type('12/31/2020');
it('should not show an error if the user enters a date after 12/31/2015', () => {
cy.get('#auditee_fiscal_period_start').clear().type('1/1/2016');
cy.get('#fy-error-message li').should('have.length', 0);
});
});
Expand Down Expand Up @@ -131,7 +131,9 @@ describe('Create New Audit', () => {

it('should remove the error message when valid end date is supplied', () => {
cy.get('#auditee_fiscal_period_end').type('01/31/2023').blur();
cy.get('#auditee_fiscal_period_end-date-order').should('not.be.visible');
cy.get('#auditee_fiscal_period_end-date-order').should(
'not.be.visible'
);
});
});

Expand Down
4 changes: 2 additions & 2 deletions backend/static/js/check-ueid.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ function validateFyStartDate(fyInput) {
[userFy.year, userFy.month, userFy.day] = fyInput.value.split('-');
fyErrorContainer.innerHTML = '';

if (userFy.year < 2020) {
if (userFy.year < 2016) {
const errorEl = document.createElement('li');
errorEl.innerHTML =
'We are currently only accepting audits from FY22.\
'We are currently only accepting audits from FY16 or later.\
To submit an audit for a different fiscal period, \
visit the <a href="https://facides.census.gov/Account/Login.aspx">Census Bureau</a>.';
fyErrorContainer.appendChild(errorEl);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Generated by Django 4.2.5 on 2023-10-13 19:54

from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):
dependencies = [
("support", "0004_alter_cognizantbaseline_date_assigned_and_more"),
]

operations = [
migrations.AlterField(
model_name="cognizantbaseline",
name="cognizant_agency",
field=models.CharField(
help_text="Two digit Federal agency prefix of the cognizant agency",
max_length=2,
verbose_name="Cog Agency",
),
),
migrations.AlterField(
model_name="cognizantbaseline",
name="date_assigned",
field=models.DateTimeField(
default=django.utils.timezone.now,
help_text="Time when the cog agency was assigned to the entity",
null=True,
verbose_name="Date Assigned",
),
),
migrations.AlterField(
model_name="cognizantbaseline",
name="dbkey",
field=models.CharField(
help_text="Identifier for a submission along with audit_year in Census FAC",
max_length=20,
null=True,
verbose_name="dbkey",
),
),
migrations.AlterField(
model_name="cognizantbaseline",
name="ein",
field=models.CharField(
help_text="Primary Employer Identification Number",
max_length=30,
null=True,
verbose_name="EIN",
),
),
migrations.AlterField(
model_name="cognizantbaseline",
name="is_active",
field=models.BooleanField(
default=True,
help_text="Record to be ignored if this field is False",
verbose_name="Active",
),
),
migrations.AlterField(
model_name="cognizantbaseline",
name="source",
field=models.CharField(
default="GSAFAC",
help_text="Source of cognizant data",
max_length=10,
verbose_name="Source",
),
),
migrations.AlterField(
model_name="cognizantbaseline",
name="uei",
field=models.CharField(
help_text="Unique Employer Identification Number",
max_length=30,
null=True,
verbose_name="UEI",
),
),
]
Loading