0.3.49
This commit is contained in:
@@ -89,11 +89,11 @@ func intPtr(v int) *int { return &v }
|
||||
// once, here, rather than the admin console guessing at it independently and drifting from
|
||||
// what a television actually understands.
|
||||
type rowTypeDefinition struct {
|
||||
Type string `json:"type"`
|
||||
Label string `json:"label"`
|
||||
Description string `json:"description"`
|
||||
Component string `json:"component"`
|
||||
DataSource string `json:"dataSource"`
|
||||
Type string `json:"type"`
|
||||
Label string `json:"label"`
|
||||
Description string `json:"description"`
|
||||
Component string `json:"component"`
|
||||
DataSource string `json:"dataSource"`
|
||||
// Pages lists which of Home/Movies/TV this type may be placed on. A row whose type
|
||||
// is not valid for the page it is being saved to is exactly the "unsupported row/page
|
||||
// combination" the visual editor exists to make impossible.
|
||||
@@ -173,6 +173,10 @@ func validateSectionDefinitions(key string, raw json.RawMessage) error {
|
||||
if definition.MaxItems < 0 || definition.MaxItems > 100 {
|
||||
return errors.New(key + ": row " + id + " has an invalid maximum item count")
|
||||
}
|
||||
if definition.Layout != "" &&
|
||||
definition.Layout != config.SectionLayoutPoster && definition.Layout != config.SectionLayoutThumb {
|
||||
return errors.New(key + ": row " + id + " has an invalid card layout")
|
||||
}
|
||||
if strings.TrimSpace(definition.Component) == "" {
|
||||
return errors.New(key + ": row " + id + " needs a component")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user