Skip to content

Commit

Permalink
don't try to create a fake user
Browse files Browse the repository at this point in the history
  • Loading branch information
danswick committed Oct 21, 2023
1 parent 2ab4b68 commit 510fd7d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions backend/dissemination/workbooklib/workbook_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from dissemination.workbooklib.additional_eins import generate_additional_eins
from dissemination.workbooklib.secondary_auditors import generate_secondary_auditors

from model_bakery import baker
from django.contrib.auth import get_user_model

import logging
Expand Down Expand Up @@ -59,12 +58,7 @@ def setup_sac(user, test_name, dbkey):
submitted_by=user, general_information__auditee_name=test_name
).first()
else:
sac = SingleAuditChecklist()
User = get_user_model()
user = baker.make(User)
sac.submitted_by = user
sac.general_information = {}
sac.general_information["auditee_name"] = test_name
logger.info("No user found, have you logged in once?")

logger.info(sac)
if sac is None:
Expand Down

0 comments on commit 510fd7d

Please sign in to comment.