Update RepositoryForm for LocalSiteAwareModelFormMixin.

Review Request #10371 — Created Jan. 2, 2019 and submitted

Information

Review Board
release-3.0.x
7ebabda...

Reviewers

This updates RepositoryForm to use the new
LocalSiteAwareModelFormMixin, providing automatic validation of
related objects and the ability to limit choices to a LocalSite. This
simplifies a complex form just a bit, helping making it less likely that
a Local Site leak will occur down the road.

The largest part of this change is the introduction of new unit tests
that ensure that the form can be limited to a LocalSite without
problems. Otherwise, it's mostly about inheriting from the mixin,
removing old (redundant and slow) validation logic, and removing some
now unnecessary state tracking.

Unit tests pass.

Tested manually creating and modifying repositories, including changing
LocalSite associations.

david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.0.x (9b908ee)