Fix add_vm_network method in db.