mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-05 00:45:50 +08:00
Protect against nil blueprint (#634)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user