Skip to content

Commit

Permalink
Send transitions as a list
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Dec 19, 2023
1 parent a02d5e1 commit 2d19558
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 3 additions & 4 deletions funnel/forms/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ class ProfileTransitionForm(forms.Form):

def set_queries(self) -> None:
"""Prepare form for use."""
self.transition.choices = [
(k, v.data['title'])
for k, v in self.edit_obj.profile_state.transitions().items()
]
self.transition.choices = list(
self.edit_obj.profile_state.transitions().items()
)


@Account.forms('logo')
Expand Down
4 changes: 1 addition & 3 deletions funnel/forms/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,7 @@ class ProjectTransitionForm(forms.Form):

def set_queries(self) -> None:
"""Prepare form for use."""
self.transition.choices = [
(k, v.data['title']) for k, v in self.edit_obj.state.transitions().items()
]
self.transition.choices = list(self.edit_obj.state.transitions().items())


@Project.forms('cfp_transition')
Expand Down

0 comments on commit 2d19558

Please sign in to comment.