Fix AttributeError when reminder jump_url is None#3496
Fix AttributeError when reminder jump_url is None#3496oliveman-au wants to merge 1 commit intopython-discord:mainfrom
AttributeError when reminder jump_url is None#3496Conversation
|
Does this issue actually occur? When was the field added to the API? |
yeah it can, any reminder made before |
|
The reminders cog was added in 2018, the |
thanks for checking that, good to know. i'll close this one |
|
closing this as the maintainers confirmed all reminders in the db have jump_url set so this can't actually occur anymore |
send_remindercrashes with anAttributeErrorwhenjump_urlisNone. This can happen for older reminders created before the field was added to the API.reminder.get("jump_url")returnsNoneif the key is absent, but.split()was being called on it unconditionally, which causes the reminder to never be delivered.This fix guards against
Nonebefore calling.split()and skips the jump URL embed line if there's no URL, falling back to a plainchannel.sendinstead.