mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Handle null response case (#7512)
This commit is contained in:
parent
c9e9ef1754
commit
9c3914db0a
@ -82,8 +82,8 @@ export const doBasicLogin = async (username: string, password: string) => {
|
||||
})
|
||||
.catch((err) => {
|
||||
if (
|
||||
err?.response.status == 403 &&
|
||||
err?.response.data.detail == 'MFA required for this user'
|
||||
err?.response?.status == 403 &&
|
||||
err?.response?.data?.detail == 'MFA required for this user'
|
||||
) {
|
||||
post(apiUrl(ApiEndpoints.user_login), {
|
||||
username: username,
|
||||
|
Loading…
Reference in New Issue
Block a user