Closed aj-he closed 3 months ago
@whatisgalen I have no idea why all these checks are failing as the migrations all work as expected on my local machine?
Hey Andy. The check is saying there's a "missing" migration, so you just need to run makemigrations.
@whatisgalen please wait before looking at this as @jacobtylerwalls is investigating how we should be using TransactionTestCase. I'll remove you as reviewer until ready
Hey all. I followed up on Slack, but basically we can just add serialized_rollback = True
and everything should work without having to manually manage the truncation (modulo a couple changes to the user signals). You can borrow what you need from d7c1f60f2f7ec31a355b7ddce29ca5c5ba9eba50, I hope?
@jacobtylerwalls I've implemented the serialized_rollback = True
approach and remove all the class methods, which works in isolation. However, the tests/bulkdata/single_csv_tests.py
test is causing an issue, even with the changes you made in the commit you reference (move code out of the class methods and modify).
The error refers to missing ContentType, which makes me think that truncation is occurring prematurely...
django.contrib.contenttypes.models.ContentType.DoesNotExist: ContentType matching query does not exist.
If I remove the single_csv_tests TransactionTestCase then it works fine.
Hey @aj-he. That's the failure I see when I don't include the changes to the save_profile() and create_permissions_for_new_users() signals in that commit. Just checking that you included those changes as well?
@jacobtylerwalls - yep, that was it! I didn't pick up on those signal tweaks. This branch has gotten a bit dirty so I'm going to close this PR and rebase tidying up. It also depends on your commits mentioned so will need to wait for those to go through. Thanks
Types of changes
Description of Change
Updates to spatialview database functions for language support and improved testing/validation
Issues Solved
Closes #10705
Checklist
Accessibility Checklist
Developer Guide
Ticket Background
Further comments
This change is in combination with #10704, which added language code to the Spatialview model and is providing an API to manage them outside django admin.