Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(conversation): fixing bookmarks without resource.name #5793

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

whitdog47
Copy link
Contributor

This pull request addresses an issue in the add_conversation_bookmark function where bookmarks could not be added if the resource object lacked a name attribute. The changes ensure that a bookmark can still be created by using alternative identifiers when resource.name is unavailable.

Changes Made

  • Refactored Resource Name Handling:
    • Introduced a new logic to determine resource_name when resource.name is not present. It now checks for resource.resource_type and uses deslug_and_capitalize_resource_type to generate a name. If neither is available, it defaults to the provided title or "untitled resource".
  • Updated Log Messages:
    • Modified log messages to use resource_name instead of directly accessing resource.name, ensuring consistent and meaningful logging even when resource.name is absent.
  • Code Adjustments:
    • Adjusted the conditional checks and log messages throughout the function to accommodate the new resource_name logic.

@whitdog47 whitdog47 self-assigned this Feb 28, 2025
@whitdog47 whitdog47 added the bug Something isn't working label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants