Skip to content

fix: use dict.get() instead of getattr() for plugin category#448

Merged
utksh1 merged 3 commits into
utksh1:mainfrom
aaniya22:fix/plugins-summary-category-getattr-clean
May 31, 2026
Merged

fix: use dict.get() instead of getattr() for plugin category#448
utksh1 merged 3 commits into
utksh1:mainfrom
aaniya22:fix/plugins-summary-category-getattr-clean

Conversation

@aaniya22
Copy link
Copy Markdown
Contributor

Description

Replace getattr(plugin, 'category', 'Unknown') with plugin.get('category', 'Unknown') in /api/v1/plugins/summary since plugins are dicts, not objects.

Related Issues

Split from #433 as requested by maintainer.

Type of Change

  • Bug fix

@utksh1 utksh1 added level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label area:backend Backend API, database, or service work labels May 31, 2026
Copy link
Copy Markdown
Owner

@utksh1 utksh1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good: focused one-line fix for get_plugins_summary using dict access for list_plugins() results; existing route coverage covers the summary response shape.

@utksh1 utksh1 added the gssoc:approved Admin validation: approved for GSSoC scoring label May 31, 2026
@utksh1 utksh1 merged commit 4e7a58c into utksh1:main May 31, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work gssoc:approved Admin validation: approved for GSSoC scoring level:beginner 20 pts difficulty label for small beginner-friendly PRs type:bug Bug fix work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants