Closed rebeccacremona closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
df311d9
) 71.25% compared to head (2ee559a
) 71.25%. Report is 7 commits behind head on develop.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
As written, the
manage_organization
view function handles both GET and POST.POST is simpler than GET; POST just processes a form, while GET retrieves a bunch of data about all the orgs visible to the user.
If we redesign this view (which we probably will), or if I were really refactoring, I'd split these out into separate view functions.
But, for now, almost as good: this PR just reorders the logic, quickly handling the form and
return
ing if this is a POST, instead of collecting the data regardless of method.This should speed up
POST
, and potentially ward off a weird edge case where, if a user submits multiple POSTs at exactly the right moments, instead of just successfully creating multiple orgs, the database gets itself in a bind.