Skip to content

Commit 5ead127

Browse files
committed
Update exclude filter for Tenant Subscriptions page
b/c in v4.0.0 the subscription format was update to include the vendor prefix. This change fixes a bug where the Tenant Subscription page cannot find the last active purchase b/c it is filtering incorrectly.
1 parent 611bb44 commit 5ead127

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tcms_github_marketplace/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2019-2024 Alexander Todorov <[email protected]>
1+
# Copyright (c) 2019-2025 Alexander Todorov <[email protected]>
22
#
33
# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
44
# https://www.gnu.org/licenses/agpl-3.0.html
@@ -773,7 +773,7 @@ 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=None).first()
776+
return self.get_queryset().exclude(subscription__contains="None").first()
777777

778778
def get_context_data(self, **kwargs):
779779
context = super().get_context_data(**kwargs)

0 commit comments

Comments
 (0)