diff --git a/hydroshare_jupyter_sync/server.py b/hydroshare_jupyter_sync/server.py index bff3cfbc..2c9c3330 100644 --- a/hydroshare_jupyter_sync/server.py +++ b/hydroshare_jupyter_sync/server.py @@ -478,7 +478,9 @@ def get(self, resource_id: str): def on_finish(self) -> None: if self.get_status() == HTTPStatus.CREATED: # dispatch resource downloaded event with resource_id - session.event_broker.dispatch("RESOURCE_DOWNLOADED", self.resource_id) + session_sync_struct.event_broker.dispatch( + "RESOURCE_DOWNLOADED", self.resource_id + ) class HydroShareResourceEntityHandler(HeadersMixIn, BaseRequestHandler): @@ -516,7 +518,7 @@ def get(self, resource_id: str, path: str): def on_finish(self) -> None: if self.get_status() == HTTPStatus.CREATED: # dispatch resource entity downloaded event with resource_id - session.event_broker.dispatch( + session_sync_struct.event_broker.dispatch( "RESOURCE_ENTITY_DOWNLOADED", self.resource_id ) @@ -612,7 +614,7 @@ def post(self, resource_id: str): def on_finish(self) -> None: if self.get_status() == HTTPStatus.CREATED: # dispatch resource uploaded event with resource_id - session.event_broker.dispatch("RESOURCE_ENTITY_UPLOADED", self.resource_id) + session_sync_struct.event_broker.dispatch("RESOURCE_ENTITY_UPLOADED", self.resource_id) def _unpack_zip_on_hydroshare( self, resource, filename: str, location: str = ""