mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-15 14:04:10 +02:00
Fix linting errors
This commit is contained in:
parent
267acd1c29
commit
62166575bd
2 changed files with 7 additions and 7 deletions
|
@ -48,7 +48,6 @@ class Command(BaseCommand):
|
||||||
# create the domain invitations for their email address
|
# create the domain invitations for their email address
|
||||||
logger.info("Reading contacts data file %s", contacts_filename)
|
logger.info("Reading contacts data file %s", contacts_filename)
|
||||||
to_create = []
|
to_create = []
|
||||||
existing = 0
|
|
||||||
skipped = 0
|
skipped = 0
|
||||||
with open(contacts_filename, "r") as contacts_file:
|
with open(contacts_filename, "r") as contacts_file:
|
||||||
for row in csv.reader(contacts_file, delimiter=sep):
|
for row in csv.reader(contacts_file, delimiter=sep):
|
||||||
|
@ -61,11 +60,13 @@ class Command(BaseCommand):
|
||||||
for domain_name in contact_domains[userid]:
|
for domain_name in contact_domains[userid]:
|
||||||
email_address = row[6]
|
email_address = row[6]
|
||||||
domain = Domain.objects.get(name=domain_name)
|
domain = Domain.objects.get(name=domain_name)
|
||||||
to_create.append(DomainInvitation(
|
to_create.append(
|
||||||
|
DomainInvitation(
|
||||||
email=email_address.lower(),
|
email=email_address.lower(),
|
||||||
domain=domain,
|
domain=domain,
|
||||||
status=DomainInvitation.INVITED,
|
status=DomainInvitation.INVITED,
|
||||||
))
|
)
|
||||||
|
)
|
||||||
logger.info("Creating %d invitations", len(to_create))
|
logger.info("Creating %d invitations", len(to_create))
|
||||||
DomainInvitation.objects.bulk_create(to_create)
|
DomainInvitation.objects.bulk_create(to_create)
|
||||||
logger.info(
|
logger.info(
|
||||||
|
|
|
@ -5,7 +5,6 @@ import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
from django.db.transaction import atomic
|
|
||||||
|
|
||||||
from registrar.models import Domain
|
from registrar.models import Domain
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue