Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kaenganxt committed Feb 11, 2024
1 parent 09e8693 commit 7868f32
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
7 changes: 4 additions & 3 deletions src/ekklesia_portal/concepts/proposition/propositions.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ def propositions(self, q, current_user, is_admin=False, count=False):
propositions = propositions.filter(Proposition.modifies_id.is_(None))

if self.only_supporting:
propositions = (propositions.join(Supporter)
.filter(Supporter.member_id == current_user.id)
.filter(Supporter.status == SupporterStatus.ACTIVE))
propositions = (
propositions.join(Supporter).filter(Supporter.member_id == current_user.id
).filter(Supporter.status == SupporterStatus.ACTIVE)
)

if count:
propositions = propositions.count()
Expand Down
18 changes: 11 additions & 7 deletions src/ekklesia_portal/concepts/user/user_cells.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,19 @@ def member_area_action(self):
return self.link(self._model, name='member_area')

def supported_areas(self):
return [support.proposition.ballot.area for support in self._model.member_propositions
if support.status == SupporterStatus.ACTIVE and support.proposition.status == PropositionStatus.SUBMITTED]
return [
support.proposition.ballot.area for support in self._model.member_propositions
if support.status == SupporterStatus.ACTIVE and support.proposition.status == PropositionStatus.SUBMITTED
]

def supported_link(self, subject_area: SubjectArea):
return self.class_link(Propositions, {
"department": subject_area.department.name,
"subject_area": subject_area.name,
"only_supporting": "yes"
})
return self.class_link(
Propositions, {
"department": subject_area.department.name,
"subject_area": subject_area.name,
"only_supporting": "yes"
}
)


@App.cell('edit')
Expand Down

0 comments on commit 7868f32

Please sign in to comment.