Skip to content

Commit 5e1e434

Browse files
committed
Further adjust the query
to account for older records which haven't been converted to the new format and crash the view
1 parent 84bb28c commit 5e1e434

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Product configuration
6464
Changelog
6565
---------
6666

67-
v4.2.1 (21 Apr 2025)
67+
v4.2.2 (21 Apr 2025)
6868
~~~~~~~~~~~~~~~~~~~~
6969

7070
- Bug fix: update exclude filter for Tenant Subscriptions page to account for

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def get_install_requires(path):
2626

2727
setup(
2828
name="kiwitcms-github-marketplace",
29-
version="4.2.1",
29+
version="4.2.2",
3030
description="GitHub Marketplace integration for Kiwi TCMS",
3131
long_description=get_long_description(),
3232
author="Kiwi TCMS",

tcms_github_marketplace/views.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,11 @@ def get_object(self, queryset=None):
773773
which has the subscription field set! Note that some events,
774774
e.g. order.canceled may have this field set to None
775775
"""
776-
return self.get_queryset().exclude(subscription__contains="None").first()
776+
return (
777+
self.get_queryset()
778+
.exclude(Q(subscription=None) | Q(subscription__contains="None"))
779+
.first()
780+
)
777781

778782
def get_context_data(self, **kwargs):
779783
context = super().get_context_data(**kwargs)

0 commit comments

Comments
 (0)