mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Fix attributeerror
This commit is contained in:
parent
1076ab4eca
commit
990343e711
1 changed files with 4 additions and 1 deletions
|
@ -382,7 +382,10 @@ class AssignmentsCog(commands.Cog):
|
|||
assignment: Assignments = await get_or_none(Assignments, entry_id=int(entry_id))
|
||||
if not assignment:
|
||||
return await ctx.respond("\N{cross mark} Unknown assignment.")
|
||||
await assignment.created_by.load()
|
||||
try:
|
||||
await assignment.created_by.load()
|
||||
except AttributeError as e:
|
||||
console.log(f"[red]Failed to load created_by row for assignment {assignment}: {e}")
|
||||
cog = self
|
||||
|
||||
class EditAssignmentView(discord.ui.View):
|
||||
|
|
Loading…
Reference in a new issue