I am getting TransactionManagementError when trying to save a Django User model instance and in its post_save signal, I\'m saving some models that have the user as the forei
In my case it was caused but not calling super().tearDownClass()
class TnsFileViewSetTestCase(APITestCase):
@classmethod
def tearDownClass(self):
super().tearDownClass() # without this line we will get TransactionManagementError
for tnsfile in TnsFile.objects.all():
tnsfile.file.delete()