From fdfb688ad9092f380243d5942b377cc5c845585b Mon Sep 17 00:00:00 2001 From: Yevgeny Kazakov Date: Wed, 2 Oct 2024 15:03:59 +0200 Subject: [PATCH] Fix notebook_id in result of assignment list #24 --- ngshare_exchange/list.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ngshare_exchange/list.py b/ngshare_exchange/list.py index 546a698..bf6c62a 100644 --- a/ngshare_exchange/list.py +++ b/ngshare_exchange/list.py @@ -383,7 +383,7 @@ def nb_key(nb): info['notebooks'] = [] for notebook in notebooks: - if self.cached: + if self.cached or info['status'] == 'fetched': nb_info = { 'notebook_id': os.path.splitext( os.path.split(notebook)[1] @@ -392,11 +392,6 @@ def nb_key(nb): } elif self.inbound: nb_info = {'notebook_id': notebook['notebook_id']} - elif info['status'] == 'fetched': - nb_info = { - 'notebook_id': notebook, - 'path': os.path.abspath(notebook), - } else: nb_info = {'notebook_id': notebook} if info['status'] != 'submitted':