pytest gcd-django/apps/oi/tests/test_views.pypython manage.py checkpython -m flake8 apps/oi/views.py apps/oi/tests/test_views.pygit diff --checkhttps://github.com/GrandComicsDatabase/gcd-django/pull/751
(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 submission email logic to respect the approver's preference for collapsing the compare view by appending ?collapse=1 to the comparison URL when enabled, and adds a corresponding test case. The review feedback suggests adding a defensive check to ensure the approver has an associated Indexer profile before accessing its attributes, preventing potential RelatedObjectDoesNotExist exceptions.
In apps/oi/views.py:
> @@ -579,6 +579,12 @@ def submit(request, id):
comment_text
else:
comment = ''
+ compare_url = settings.SITE_URL.rstrip('/') + urlresolvers.reverse(
+ 'compare', kwargs={'id': changeset.id})
+ if changeset.approver.indexer.collapse_compare_view:
If the assigned approver (changeset.approver) does not have an associated Indexer profile (for example, if they are a newly created user or a system user without a profile), accessing changeset.approver.indexer will raise a RelatedObjectDoesNotExist exception, leading to a 500 error during submission.\n\nUsing a defensive check like hasattr(changeset.approver, 'indexer') prevents this potential crash.
- if changeset.approver.indexer.collapse_compare_view: + if hasattr(changeset.approver, 'indexer') and changeset.approver.indexer.collapse_compare_view:
—
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.![]()
@jhunterjActual commented on this pull request.
In apps/oi/views.py:
> @@ -579,6 +579,12 @@ def submit(request, id):
comment_text
else:
comment = ''
+ compare_url = settings.SITE_URL.rstrip('/') + urlresolvers.reverse(
+ 'compare', kwargs={'id': changeset.id})
+ if changeset.approver.indexer.collapse_compare_view:
Incorporated with 319ca09
—
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.![]()
@jochengcd commented on this pull request.
In apps/oi/views.py:
> @@ -579,6 +579,12 @@ def submit(request, id):
comment_text
else:
comment = ''
+ compare_url = settings.SITE_URL.rstrip('/') + urlresolvers.reverse(
+ 'compare', kwargs={'id': changeset.id})
+ if changeset.approver.indexer.collapse_compare_view:
This cannot happen, an approver always has an indexer. It doesn't really hurt to do the check, but is unneeded code which one could stumble over.
—
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.![]()
—
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.![]()