mirror of
https://github.com/penpot/penpot.git
synced 2026-05-30 04:08:08 +00:00
🐛 Fix default team showing up in count
This commit is contained in:
parent
5ffec3e5e9
commit
15d6df48f5
@ -147,10 +147,9 @@
|
||||
|
||||
(defn get-leave-org-summary
|
||||
[cfg default-team-id teams-to-delete teams-to-transfer-count teams-to-exit-count]
|
||||
(let [{:keys [deletable-team-ids delete-default-team? detach-from-org-team-ids]}
|
||||
(let [{:keys [deletable-team-ids detach-from-org-team-ids]}
|
||||
(build-leave-org-plan cfg default-team-id teams-to-delete nil)]
|
||||
{:teams-to-delete (+ (count deletable-team-ids)
|
||||
(if delete-default-team? 1 0))
|
||||
{:teams-to-delete (count deletable-team-ids)
|
||||
:teams-to-transfer teams-to-transfer-count
|
||||
:teams-to-exit teams-to-exit-count
|
||||
:teams-to-detach (count detach-from-org-team-ids)}))
|
||||
|
||||
@ -1025,7 +1025,7 @@
|
||||
:organization-id organization-id
|
||||
:default-team-id (:id org-team)}))]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= {:teams-to-delete 1
|
||||
(t/is (= {:teams-to-delete 0
|
||||
:teams-to-transfer 0
|
||||
:teams-to-exit 0
|
||||
:teams-to-detach 0}
|
||||
@ -1052,7 +1052,7 @@
|
||||
:organization-id organization-id
|
||||
:default-team-id (:id org-team)}))]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= {:teams-to-delete 2
|
||||
(t/is (= {:teams-to-delete 1
|
||||
:teams-to-transfer 0
|
||||
:teams-to-exit 0
|
||||
:teams-to-detach 0}
|
||||
@ -1083,7 +1083,7 @@
|
||||
:organization-id organization-id
|
||||
:default-team-id (:id org-team)}))]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= {:teams-to-delete 1
|
||||
(t/is (= {:teams-to-delete 0
|
||||
:teams-to-transfer 1
|
||||
:teams-to-exit 0
|
||||
:teams-to-detach 0}
|
||||
@ -1113,7 +1113,7 @@
|
||||
:organization-id organization-id
|
||||
:default-team-id (:id org-team)}))]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= {:teams-to-delete 1
|
||||
(t/is (= {:teams-to-delete 0
|
||||
:teams-to-transfer 0
|
||||
:teams-to-exit 1
|
||||
:teams-to-detach 0}
|
||||
|
||||
@ -307,7 +307,7 @@
|
||||
:id organization-id
|
||||
:default-team-id your-penpot-id})]
|
||||
(t/is (th/success? out))
|
||||
(t/is (= {:teams-to-delete 1
|
||||
(t/is (= {:teams-to-delete 0
|
||||
:teams-to-transfer 0
|
||||
:teams-to-exit 0
|
||||
:teams-to-detach 0}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user