File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -258,8 +258,8 @@ async def show_projects(update, context):
258258async def show_my_projects (update , context ):
259259 """Let people see what projects they have voted for"""
260260
261- user_id = Pycampista .get (Pycampista .username == update .message .from_user .username )
262- votes = Vote .select (Project , Slot ).join (Project ).join (Slot ).where ((Vote .pycampista == user_id ) & Vote .interest ).order_by (Slot .code )
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 )
263263
264264 if votes :
265265 text_chunks = []
@@ -273,13 +273,13 @@ async def show_my_projects(update, context):
273273 if slot_day_code != prev_slot_day_code :
274274 text_chunks .append (f'*{ slot_day_name } *' )
275275
276- slot_start_time = str (vote .project .slot .start ) + ':00'
277- project_text = "{}\n {}\n Owner: @{}" .format (
278- slot_start_time ,
276+ project_lines = [
277+ f'{ vote .project .slot .start } :00' ,
279278 vote .project .name ,
280- vote .project .owner .username ,
281- )
282- text_chunks .append (project_text )
279+ f'Owner: @{ vote .project .owner .username } ' ,
280+ ]
281+
282+ text_chunks .append ('\n ' .join (project_lines ))
283283
284284 prev_slot_day_code = slot_day_code
285285
You can’t perform that action at this time.
0 commit comments