The issue is within the fetchAutomats
method, you need to return the promise from the method:
export const fetchAutomats = () => {
var requestString = backendServer + 'api/general/automats_for_form/'
return axios.get(requestString, getAuthHeader())
.then((Response) => {
return { automats: Response.data, message: null };
})
.catch((Error) => {
return getErrorMessage(Error);
})
}
CLICK HERE to find out more related problems solutions.