Protect against nil blueprint (#634)

This commit is contained in:
Jesse Peterson
2020-01-10 11:01:28 -08:00
committed by GitHub
parent 1278d2f490
commit ea5c0a3865

View File

@@ -63,6 +63,9 @@ func (db *DB) List() ([]blueprint.Blueprint, error) {
}
func (db *DB) Save(bp *blueprint.Blueprint) error {
if bp == nil {
return errors.New("no blueprint supplied")
}
ctx := context.TODO()
err := bp.Verify()
if err != nil {