From 59b59667372e2d9df4161048350b1475202f4dbd Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Sat, 22 Aug 2026 00:44:50 +0000 Subject: [PATCH] fix: prevent AttributeError when `ctx.obj` is None in `CodecovOption.get_default` --- codecov_cli/fallbacks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov_cli/fallbacks.py b/codecov_cli/fallbacks.py index 099b391db..761ffb03e 100644 --- a/codecov_cli/fallbacks.py +++ b/codecov_cli/fallbacks.py @@ -47,7 +47,7 @@ def get_default( res = super().get_default(ctx, call=call) if res is not None: return res - if self.fallback_fields is not None: + if self.fallback_fields is not None and ctx.obj is not None: for field in self.fallback_fields: if ctx.obj.get("ci_adapter") is not None: res = ctx.obj.get("ci_adapter").get_fallback_value(field)