diff --git a/CHANGES.md b/CHANGES.md index 9db6dad948..fceece355a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -74,6 +74,7 @@ - Fix not controlled theme renaming [Taiga #12411](https://tree.taiga.io/project/penpot/issue/12411) - Fix paste without selection sends the new element in the back [Taiga #12382](https://tree.taiga.io/project/penpot/issue/12382) - Fix options button does not work for comments created in the lower part of the screen [Taiga #12422](https://tree.taiga.io/project/penpot/issue/12422) +- Fix problem when checking usage with removed teams [Taiga #12442](https://tree.taiga.io/project/penpot/issue/12442) ## 2.10.1 diff --git a/backend/src/app/rpc/commands/profile.clj b/backend/src/app/rpc/commands/profile.clj index 2998f6be8a..38e86f5043 100644 --- a/backend/src/app/rpc/commands/profile.clj +++ b/backend/src/app/rpc/commands/profile.clj @@ -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"}