From 93a8994e9ff939272d2628e90449a6fd208386f8 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 16 Oct 2021 16:24:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Save=20started=20notebook=20id?= =?UTF-8?q?=20on=20the=20database?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/sophon/notebooks/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/sophon/notebooks/models.py b/backend/sophon/notebooks/models.py index 5bb9b37..6ecb66f 100644 --- a/backend/sophon/notebooks/models.py +++ b/backend/sophon/notebooks/models.py @@ -367,7 +367,8 @@ class Notebook(SophonGroupModel): return self.container_id = container.id - # self.port = container.ports + self.save() + return container class ContainerError(Exception): @@ -457,7 +458,10 @@ class Notebook(SophonGroupModel): }, ) + self.log.debug("Storing container_id in the SQL database...") self.container_id = container.id + self.save() + return container def stop_container(self) -> None: