Skip to content

Fix crash when creating a Fund without projects enabled#4642

Merged
wes-otf merged 1 commit into
HyphaApp:mainfrom
bmispelon:fund-create-crash-if-no-projects
Dec 5, 2025
Merged

Fix crash when creating a Fund without projects enabled#4642
wes-otf merged 1 commit into
HyphaApp:mainfrom
bmispelon:fund-create-crash-if-no-projects

Conversation

@bmispelon

Copy link
Copy Markdown
Contributor

Reproduction steps:

  1. Make sure you have settings.PROJECTS_ENABLED = False (the default if you use the base settings)
  2. In the admin, create a Fund
  3. When saving the form (publish), you get a 500 error (KeyError: 'approval_forms')


if settings.PROJECTS_ENABLED:
paf_forms = self.formsets["approval_forms"]
self.validate_paf_form(paf_forms)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks clean and easy to understand.

@wes-otf wes-otf added Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team Type: Patch Mini change, used in release drafter labels Dec 3, 2025
@wes-otf wes-otf added Status: Tested - approved for live ✅ and removed Status: Needs dev testing 🧑‍💻 Tasks that should be tested by the dev team labels Dec 5, 2025
@wes-otf wes-otf merged commit e06aea8 into HyphaApp:main Dec 5, 2025
12 checks passed
@wes-otf

wes-otf commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Thank you @bmispelon!

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

Labels

Status: Tested - approved for live ✅ Type: Patch Mini change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants