Skip to content

Conversation

@JoeyStk
Copy link
Contributor

@JoeyStk JoeyStk commented Dec 21, 2025

Short description

This PR is based off of #3837 and can only be reviewed (properly) after the Django update is open :). During our work on the upgrade, we had to do a few changes to the poi_form_view and event_form_view. Those changes increased the complexity of the files (for poi_form_view it even made it necessary to disable a ruff rule). This PR attempts to fix these issues.

For an easier view to review this, this link might be helpful :)

Proposed changes

  • Reduce CC of event_form_view from 30 to 26
  • Reduce LOC of event_form_view from 201 to 177
  • Reduce CC of poi_form_view from 33 to 14
  • Reduce LOC of poi_form_view from 232 to 141
  • Reduce statements in poi_form_view, so that rule can be enabled again

Side effects

  • This refactoring is by no means "perfect", these were just a few low hanging fruits I wanted to collect for us.
  • Feel free to either extend this refactoring or refactor these files even more in the future
  • As with all refactorings, I tried my best to pay attention to all the details, but of course there is a high chance of human error, so horough testing is highly appreciated.

Faithfulness to issue description and design

There are no intended deviations from the issue and design.

How to test

  • All actions in event form and poi form :)

Resolved issues

Fixes: /


Pull Request Review Guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants