Skip to content

Commit

Permalink
fix undefined reference to session sync object in post login handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Raney authored and Austin Raney committed Sep 27, 2021
1 parent c40865a commit 927d0ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions hydroshare_jupyter_sync/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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 = ""
Expand Down

0 comments on commit 927d0ab

Please sign in to comment.