Skip to content

Commit

Permalink
Merge pull request #81 from CanDIG/hotfix/none
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh authored Nov 25, 2024
2 parents 3636b60 + 9b2c257 commit 3452782
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions candig_federation/heartbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

def check_pulse():
servers = get_registered_servers()
if servers is None:
return
if len(servers) == 0:
return
# Determine which sites we have access to
Expand Down
6 changes: 5 additions & 1 deletion candig_federation/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def list_services():
"""
:return: Dictionary of registered services.
"""
return list(get_registered_services().values()), 200
services = get_registered_services()
if services is not None:
return list(services.values()), 200
logger.debug(f"Couldn't list services", request)
return {"message": "Couldn't list services"}, 500


@app.route('/services/<path:service_id>')
Expand Down

0 comments on commit 3452782

Please sign in to comment.