Delete machine from db
This commit is contained in:
parent
3dbd9286be
commit
896cdea21f
@ -35,13 +35,11 @@ func (m *Machine) ID() (id string, err error) {
|
|||||||
// SetID implements core.Machine
|
// SetID implements core.Machine
|
||||||
func (m *Machine) SetID(value string) (err error) {
|
func (m *Machine) SetID(value string) (err error) {
|
||||||
if value == "" {
|
if value == "" {
|
||||||
err = m.Destroy()
|
return m.Destroy()
|
||||||
if err != nil {
|
} else {
|
||||||
return err
|
m.machine.Id = value
|
||||||
}
|
return m.SaveMachine()
|
||||||
}
|
}
|
||||||
m.machine.Id = value
|
|
||||||
return m.SaveMachine()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Machine) Box() (b core.Box, err error) {
|
func (m *Machine) Box() (b core.Box, err error) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user