fix parsing profile units
This commit is contained in:
parent
60dce8fd15
commit
034bf3ecd8
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ class ProfileStore(val data: JSONObject) {
|
||||||
if (profile == null) {
|
if (profile == null) {
|
||||||
JsonHelper.safeGetJSONObject(store, profileName, null)?.let { profileObject ->
|
JsonHelper.safeGetJSONObject(store, profileName, null)?.let { profileObject ->
|
||||||
// take units from profile and if N/A from store
|
// take units from profile and if N/A from store
|
||||||
JsonHelper.safeGetStringAllowNull(profileObject, "units", JsonHelper.safeGetString(store, "units"))?.let { units ->
|
JsonHelper.safeGetStringAllowNull(profileObject, "units", JsonHelper.safeGetString(data, "units"))?.let { units ->
|
||||||
profile = Profile(profileObject, units)
|
profile = Profile(profileObject, units)
|
||||||
cachedObjects[profileName] = profile
|
cachedObjects[profileName] = profile
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue