Strange to see the check that "return None" returns None—and good riddance I suppose.
I would still have liked to see a test, especially since the version I originally tried to review had a performance bug and the overall page is not in a shape that can be tested for query counts yet. I know it's arguably not a "new layer" and this is just a refactoring but you're trying to make an important change and you almost made things worse because of untested new code—however small.
Strange to see the check that "return None" returns None—and good riddance I suppose.
I would still have liked to see a test, especially since the version I originally tried to review had a performance bug and the overall page is not in a shape that can be tested for query counts yet. I know it's arguably not a "new layer" and this is just a refactoring but you're trying to make an important change and you almost made things worse because of untested new code—however small.