When unsetting machine ID, just set state to not created

This commit is contained in:
Chris Roberts 2022-07-08 08:41:24 -07:00
parent df0a4342a6
commit 08bcc8e9c7

View File

@ -52,11 +52,11 @@ func (m *Machine) SetID(value string) (err error) {
// Persist changes
if value == "" {
m.target.Record = nil
err = m.Destroy()
} else {
err = m.SaveMachine()
m.target.State = vagrant_server.Operation_NOT_CREATED
}
err = m.SaveMachine()
return
}