Clean up the logic for cleaning RelationCounterField instance states.

Review Request #9759 — Created March 7, 2018 and submitted

Information

Djblets
release-1.0.x
5e26fe2...

Reviewers

_reset_state() is responsible for clearing out any state entries for a
given set of instance information, or for any instance states without an
active instance (one that was destroyed). The code wasn't super clear,
and a bit harder to debug.

This change redoes that logic, splitting it into two pieces: The part
that cleans up a state dictionary, and the part that calls it for each
dictionary.

Unit tests pass.

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