Skip to content

Commit b753590

Browse files
committed
Minor changes related to show_my_projects command
1 parent 4ae4ecc commit b753590

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/pycamp_bot/commands/projects.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,20 @@ async def show_projects(update, context):
258258
async def show_my_projects(update, context):
259259
"""Let people see what projects they have voted for"""
260260

261-
user = Pycampista.get(Pycampista.username == update.message.from_user.username)
262-
votes = Vote.select(Project, Slot).join(Project).join(Slot).where((Vote.pycampista == user) & Vote.interest).order_by(Slot.code)
261+
user = Pycampista.get(
262+
Pycampista.username == update.message.from_user.username,
263+
)
264+
votes = (
265+
Vote
266+
.select(Project, Slot)
267+
.join(Project)
268+
.join(Slot)
269+
.where(
270+
(Vote.pycampista == user) &
271+
Vote.interest
272+
)
273+
.order_by(Slot.code)
274+
)
263275

264276
if votes:
265277
text_chunks = []

0 commit comments

Comments
 (0)