harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
36 stars 30 forks source link

Don't invent a new resource type out of thin air; fixes #1988 #1989

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

If the user types a single item into the Quick Add in Outline mode, previously the item was invalid because it was coming along with a resource type that doesn't exist. The item would appear to work up to a point but there are many places in the code where this is expected to come from a set of known values that have database representations. There's apparently no server-side validation around this, but probably not worth adding at this point.

This sets the default resource type for a single-item outline to Custom Content. The usual mode for outline content is unaffected here (each outline item will get an assigned type asynchronously).