Skip to content

Commit

Permalink
fix: only get org invites if an org exists (#20376)
Browse files Browse the repository at this point in the history
only get org invites if an org exists
  • Loading branch information
raquelmsmith authored Feb 16, 2024
1 parent d0d7805 commit fc53eb4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/scenes/settings/organization/inviteLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export const inviteLogic = kea<inviteLogicType>([
[] as OrganizationInviteType[],
{
loadInvites: async () => {
return (await api.get('api/organizations/@current/invites/')).results
return organizationLogic.values.currentOrganization
? (await api.get('api/organizations/@current/invites/')).results
: []
},
deleteInvite: async (invite: OrganizationInviteType) => {
await api.delete(`api/organizations/@current/invites/${invite.id}/`)
Expand Down

0 comments on commit fc53eb4

Please sign in to comment.