You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.
The assets that we are using have multiple locales, and whenever we try to func (service *AssetsService) Get OR func (service *AssetsService) List we get a a panic: interface conversion: interface {} is nil, not string.
We believe this is due to the types as defined below:
// FileFields model
type FileFields struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
File *File `json:"file,omitempty"`
}
// Asset model
type Asset struct {
locale string
Sys *Sys `json:"sys"`
Fields *FileFields `json:"fields"`
}
whereas an example of the the json return from the get request is as follows:
The assets that we are using have multiple locales, and whenever we try to
func (service *AssetsService) Get
ORfunc (service *AssetsService) List
we get a apanic: interface conversion: interface {} is nil, not string.
We believe this is due to the types as defined below:
whereas an example of the the json return from the get request is as follows:
which would mean the assets would unmarshall into structs more like the below:
or similar.
We tried switching to single locale, and it still seems to have the same issue.
The text was updated successfully, but these errors were encountered: