Skip to content

Commit bdea080

Browse files
authored
fix(Superuser modal): Removed case where we there isn't an API call (getsentry#40908)
1 parent 606cd2a commit bdea080

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

static/app/components/modals/sudoModal.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,11 @@ class SudoModal extends Component<Props, State> {
9090
superuserReason: suReason,
9191
});
9292
} else {
93-
if (isSuperuser) {
93+
try {
94+
await api.requestPromise('/auth/', {method: 'PUT', data});
9495
this.handleSuccess();
95-
} else {
96-
try {
97-
await api.requestPromise('/auth/', {method: 'PUT', data});
98-
this.handleSuccess();
99-
} catch (err) {
100-
this.handleError(err);
101-
}
96+
} catch (err) {
97+
this.handleError(err);
10298
}
10399
}
104100
};

0 commit comments

Comments
 (0)