diff --git a/ai4papi/routers/v1/try_me/nomad.py b/ai4papi/routers/v1/try_me/nomad.py index ef560fb..9e33190 100644 --- a/ai4papi/routers/v1/try_me/nomad.py +++ b/ai4papi/routers/v1/try_me/nomad.py @@ -77,7 +77,7 @@ def create_deployment( for k in keys: status[k] += node[k] for r in resources: - if status[f"{r}_used"] / status[f"{r}_total"] > 0.95: + if status[f"{r}_total"] == 0 or status[f"{r}_used"] / status[f"{r}_total"] > 0.95: raise HTTPException( status_code=503, detail="Sorry, but there seem to be no resources available right " \