Skip to content

refactor queries with lookupWithInitial helper

Harpo requested to merge hr/lookup-with-initial-helper into master

Add a function Util.lookupWithInitial that returns a value in a map or sets a default value and returns the default value. Then use this to cleanup the implementation of various query managers so that we don't need to assert impossible cases. Also add a newtype wrapper for Models.ContentType strings to be used in maps.

Merge request reports