Skip to content

Commit 0d45a2d

Browse files
committed
fix update mentor request to properly await coroutine
1 parent 8b5e952 commit 0d45a2d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pybot/endpoints/slack/message_templates/mentor_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ def unclaim_request(self):
239239
return self.update_airtable('')
240240

241241
async def update_airtable(self, mentor_id: Optional[str]):
242-
if mentor_id:
243-
return self.airtable.update_request(self.record, mentor_id)
242+
if mentor_id is not None:
243+
return await self.airtable.update_request(self.record, mentor_id)
244244

245245
async def update_message(self):
246246
"""
@@ -256,7 +256,7 @@ async def update_message(self):
256256
def mentee_claimed_attachment(self) -> dict:
257257
return {
258258
"text": f":100: Request claimed by <@{self.clicker}>:100:\n"
259-
f"<!date^{now()}^Claimed at {{date_num}} {{time_secs}}|Failed to parse time>",
259+
f"<!date^{now()}^Claimed at {{date_num}} {{time_secs}}|Failed to parse time>",
260260
"fallback": "",
261261
"color": "#3AA3E3",
262262
"callback_id": "claim_mentee",
@@ -273,7 +273,7 @@ def mentee_claimed_attachment(self) -> dict:
273273
def mentee_unclaimed_attachment(self) -> dict:
274274
return {
275275
'text': f"Reset by <@{self.clicker}> at"
276-
f" <!date^{now()}^ {{date_num}} {{time_secs}}|Failed to parse time>",
276+
f" <!date^{now()}^ {{date_num}} {{time_secs}}|Failed to parse time>",
277277
'fallback': '',
278278
'color': '#3AA3E3',
279279
'callback_id': 'claim_mentee',

0 commit comments

Comments
 (0)