Delete machine from db

This commit is contained in:
sophia 2022-01-20 12:33:04 -06:00 committed by Paul Hinze
parent 3dbd9286be
commit 896cdea21f
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -35,13 +35,11 @@ func (m *Machine) ID() (id string, err error) {
// SetID implements core.Machine
func (m *Machine) SetID(value string) (err error) {
if value == "" {
err = m.Destroy()
if err != nil {
return err
}
}
return m.Destroy()
} else {
m.machine.Id = value
return m.SaveMachine()
}
}
func (m *Machine) Box() (b core.Box, err error) {