Currently the code the checks the group membership for characters when saving a sequence and errors if a character is submitted with a group it isn't a member of. Improve user experience by filtering the characters by the group if the group is entered first, just like the groups are filtered by the character if the character is entered first.
https://github.com/GrandComicsDatabase/gcd-django/pull/721
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@gemini-code-assist[bot] commented on this pull request.
This pull request updates the character autocomplete widget to forward the 'group_name' field and modifies the queryset filtering in 'apps/select/views.py' to support list-based filtering. A critical indentation error was identified in the view changes that would lead to a runtime error, along with a suggestion to filter out empty values from the 'group_name' list.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
> + if not isinstance(group_name, list):
+ group_name = [group_name]
qs = qs.filter(
- character__memberships__group__group_names=group_name).distinct()
+ character__memberships__group__group_names__in=group_name).distinct()
There is an indentation error in these lines. Line 714 has 13 spaces of indentation, line 715 has 16 spaces, and line 716 has 12 spaces. In Python, inconsistent indentation will raise an IndentationError at runtime.
Additionally, to prevent empty queries when group_name contains empty or falsy values (e.g., ['']), we should filter them out before applying the queryset filter.
- if not isinstance(group_name, list): - group_name = [group_name] - qs = qs.filter( - character__memberships__group__group_names=group_name).distinct() - character__memberships__group__group_names__in=group_name).distinct() + if not isinstance(group_name, list): + group_name = [group_name] + group_name = [g for g in group_name if g] + if group_name: + qs = qs.filter( + character__memberships__group__group_names__in=group_name + ).distinct()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
@jhunterjActual pushed 1 commit.
—
View it on GitHub or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()