Skip to content

Commit

Permalink
to RC: UI: handle possibly 'null' 'storedPolicy.team_id' on update po…
Browse files Browse the repository at this point in the history
…licy ca… (#22216)

#### This PR already merged to `main`, see
#22215. This is against the release
branch so it can be included in 4.57.0 (issue #22145 )

Co-authored-by: Jacob Shandling <[email protected]>
  • Loading branch information
jacobshandling and Jacob Shandling authored Sep 18, 2024
1 parent 3a7e899 commit a3232b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/pages/policies/PolicyPage/screens/QueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const QueryEditor = ({

const updateAPIRequest = () => {
// storedPolicy.team_id is used for existing policies because selectedTeamId is subject to change
const team_id = storedPolicy?.team_id;
const team_id = storedPolicy?.team_id ?? undefined;

return team_id !== undefined
? teamPoliciesAPI.update(policyIdForEdit, {
Expand Down

0 comments on commit a3232b2

Please sign in to comment.