Skip to content

Conversation

@yashrastogi019-cell
Copy link

Fixes: #242

issue occurred when workflow.get('ai_analysis') returned None and code attempted to call get() without checking if it was None first

"workflow.get('ai_analysis', {})"
providing the default value {} only works when key is None but there was no handling when key value is None

  • added isinstance at 897 to check ex must be a dictionary

TEST CASES
image
image

@yusufkaraaslan
Copy link
Owner

Thank you @yashrastogi019-cell for this excellent bug fix! 🎉

Your solution correctly handles the edge case where ai_analysis is None instead of a dictionary. The code changes are:

However, this PR has merge conflicts with the latest development branch due to code formatting changes from PR #251 (ruff/mypy formatting applied to entire codebase).

Could you please rebase your branch?

# Add upstream remote if you haven't already
git remote add upstream https://github.com/yusufkaraaslan/Skill_Seekers.git

# Fetch latest changes
git fetch upstream

# Rebase your branch onto latest development
git checkout fix-how-to-guide-builder
git rebase upstream/development

# Resolve any conflicts (likely just formatting)
# Then force push (safe because it's your branch)
git push --force-with-lease

Conflict Resolution Tips:

  • The conflicts will be formatting-only (line wrapping, quote changes)
  • Accept the newer formatted version and keep your logic changes
  • Your or {} and isinstance() changes should remain

Once rebased, I'll merge this immediately! The fix is solid. 👍

Questions? Feel free to ask if you need help with the rebase process.

@yashrastogi019-cell
Copy link
Author

Hi @yusufkaraaslan 👋
I’ve rebased the branch onto the latest development and force-pushed the updated commits.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] C3.3 How-To Guide generation fails with 'NoneType' object has no attribute 'get'

2 participants