[Solved]-Failed: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it

22๐Ÿ‘

โœ…

Iโ€™ve found the problem.
Instead of manually creating the factory:

created_by = UserFactory()

I have to use the SubFactory

created_by = factory.SubFactory(UserFactory) 
๐Ÿ‘คEv.

Leave a comment