You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
send_reminder crashes with an AttributeError when jump_url is None. This can happen for older reminders created before the field was added to the API.
reminder.get("jump_url") returns None if the key is absent, but .split() was being called on it unconditionally, which causes the reminder to never be delivered.
This fix guards against None before calling .split() and skips the jump URL embed line if there's no URL, falling back to a plain channel.send instead.
Does this issue actually occur? When was the field added to the API?
yeah it can, any reminder made before jump_url was added to the api would have it as None. the .get() instead of direct key access kinda hints the original dev knew it might be missing but just didnt guard the .split() call on the next line
The reminders cog was added in 2018, the jump_url in 2019.
There's also no reminders in the actual DB without a jump_url, so no, it can't happen anymore.
The reminders cog was added in 2018, the jump_url in 2019. There's also no reminders in the actual DB without a jump_url, so no, it can't happen anymore.
thanks for checking that, good to know. i'll close this one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.