diff --git a/harvey/locks.py b/harvey/locks.py index dab504d..8e85109 100644 --- a/harvey/locks.py +++ b/harvey/locks.py @@ -12,7 +12,7 @@ def retrieve_lock(project_name: str) -> Dict[str, bool]: return { 'locked': lock_status['locked'], - 'system_lock': lock_status['system_lock'], + 'system_lock': lock_status.get('system_lock'), } diff --git a/harvey/repos/locks.py b/harvey/repos/locks.py index 02d6826..cf38289 100644 --- a/harvey/repos/locks.py +++ b/harvey/repos/locks.py @@ -67,7 +67,7 @@ def retrieve_locks(request: flask.Request) -> Dict[str, List[Any]]: { 'project': key, 'locked': values['locked'], - 'system_lock': values['system_lock'], + 'system_lock': values.get('system_lock'), } )