Self hosted FLOSS fitness/workout, nutrition and weight tracker
fix(static): get profile data from directly from userprofile object
Aerex70a13c424a92
diff --git a/wger/core/static/js/wger-core.js b/wger/core/static/js/wger-core.jsindex 7fe132a85..0753bb0bc 100644--- a/wger/core/static/js/wger-core.js+++ b/wger/core/static/js/wger-core.js@@ -112,7 +112,7 @@ function setProfileField(field, newValue) {}).done(function (userprofile) {console.log('Updating profile field "' + field + '" to value: ' + newValue);$.ajax({- url: '/api/v2/userprofile/' + userprofile.results[0].id + '/',+ url: '/api/v2/userprofile/' + userprofile[0].id + '/',type: 'PATCH',data: dataDict});@@ -131,7 +131,7 @@ function getProfileField(field) {type: 'GET',async: false,success: function (userprofile) {- result = userprofile.results[0][field];+ result = userprofile[0][field];}});return result;