diff --git a/src/djangooidc/tests/test_views.py b/src/djangooidc/tests/test_views.py index fc93db82e..faf9cbdd8 100644 --- a/src/djangooidc/tests/test_views.py +++ b/src/djangooidc/tests/test_views.py @@ -241,7 +241,10 @@ class ViewsTest(TestCase): @less_console_noise_decorator def test_login_callback_sets_verification_type_regular(self, mock_client): - """Test that openid sets the verification type to regular on the returned user""" + """ + Test that openid sets the verification type to regular on the returned user. + Regular, in this context, means that this user was "Verifed by Login.gov" + """ # SETUP session = self.client.session session.save() diff --git a/src/registrar/management/commands/utility/terminal_helper.py b/src/registrar/management/commands/utility/terminal_helper.py index 5076d1de8..2376439a6 100644 --- a/src/registrar/management/commands/utility/terminal_helper.py +++ b/src/registrar/management/commands/utility/terminal_helper.py @@ -93,7 +93,7 @@ class PopulateScriptTemplate(ABC): self.populate_field(updated_object) to_update.append(updated_object) except Exception as err: - to_update.append(updated_object) + failed_to_update.append(updated_object) logger.error(err) logger.error(f"{TerminalColors.FAIL}" f"Failed to update {updated_object}" f"{TerminalColors.ENDC}") diff --git a/src/registrar/migrations/0088_user_verification_type.py b/src/registrar/migrations/0089_user_verification_type.py similarity index 84% rename from src/registrar/migrations/0088_user_verification_type.py rename to src/registrar/migrations/0089_user_verification_type.py index 7fac95a3d..e021e89e1 100644 --- a/src/registrar/migrations/0088_user_verification_type.py +++ b/src/registrar/migrations/0089_user_verification_type.py @@ -1,4 +1,4 @@ -# Generated by Django 4.2.10 on 2024-04-23 20:47 +# Generated by Django 4.2.10 on 2024-04-26 14:03 from django.db import migrations, models @@ -6,7 +6,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ("registrar", "0087_alter_domain_deleted_alter_domain_expiration_date_and_more"), + ("registrar", "0088_domaininformation_cisa_representative_email_and_more"), ] operations = [ diff --git a/src/registrar/models/user.py b/src/registrar/models/user.py index 0b16d45cb..0ae785562 100644 --- a/src/registrar/models/user.py +++ b/src/registrar/models/user.py @@ -149,10 +149,10 @@ class User(AbstractUser): # always exist at this point. We do it down the line. verification_type = cls.get_verification_type_from_email(email) + # Checks if the user needs verification. # The user needs identity verification if they don't meet # any special criteria, i.e. we are validating them "regularly" - needs_verification = verification_type == cls.VerificationTypeChoices.REGULAR - return needs_verification + return verification_type == cls.VerificationTypeChoices.REGULAR def set_user_verification_type(self): """ @@ -174,7 +174,7 @@ class User(AbstractUser): # If you joined BEFORE the oldest invitation was created, then you were verified normally. # (See logic in get_verification_type_from_email) - if invitation is not None and self.date_joined < invitation.created_at: + if not invitation and self.date_joined < invitation.created_at: verification_type = User.VerificationTypeChoices.REGULAR self.verification_type = verification_type