Hopper fix when getting user in factory
This commit is contained in:
parent
3ecf4e58cb
commit
321c521fc3
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ class TaskFactory(factory.django.DjangoModelFactory):
|
|||
note = factory.LazyAttribute(lambda o: gen_content())
|
||||
priority = factory.LazyAttribute(lambda o: random.randint(1, 100))
|
||||
completed = factory.Faker('boolean', chance_of_getting_true=30)
|
||||
created_by = get_user_model().objects.get(username='staffer') # Randomized in post
|
||||
created_by = factory.LazyAttribute(lambda o: get_user_model().objects.get(username='staffer')) # Randomized in post
|
||||
created_date = factory.Faker('date_this_year')
|
||||
|
||||
@factory.post_generation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue