Skip to content

Commit de88c05

Browse files
committed
docs: correct model destroying idiom
model.info is None after disconnecting to the model so the original idiom will not work.
1 parent af10ed0 commit de88c05

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/narrative/model.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ py:method:`juju.controller.Controller.destroy_model` for more info.
110110
# Do stuff with our model...
111111
112112
# Destroy the model
113+
model_uuid = model.info.uuid
113114
await model.disconnect()
114-
await controller.destroy_model(model.info.uuid)
115+
await controller.destroy_model(model_uuid)
115116
model = None
116117
117118

0 commit comments

Comments
 (0)