🐛 Fix problem when checking usage with removed teams (#7638)

This commit is contained in:
Alonso Torres
2025-10-31 09:22:31 +01:00
committed by GitHub
parent 6a2029ca3b
commit 942e3300dd
2 changed files with 6 additions and 1 deletions

View File

@@ -475,13 +475,17 @@
p.fullname AS name,
p.email AS email
FROM team_profile_rel AS tpr1
JOIN team as t
ON tpr1.team_id = t.id
JOIN team_profile_rel AS tpr2
ON (tpr1.team_id = tpr2.team_id)
JOIN profile AS p
ON (tpr2.profile_id = p.id)
WHERE tpr1.profile_id = ?
AND tpr1.is_owner IS true
AND tpr2.can_edit IS true")
AND tpr2.can_edit IS true
AND NOT t.is_default
AND t.deleted_at IS NULL")
(sv/defmethod ::get-subscription-usage
{::doc/added "2.9"}