diff --git a/CHANGES/7678.bugfix b/CHANGES/7678.bugfix new file mode 100644 index 0000000000..81f2524523 --- /dev/null +++ b/CHANGES/7678.bugfix @@ -0,0 +1 @@ +Fixed `TypeError: 'str' object has no attribute 'tolower'` in `_ensure_bool` during incremental content exports. Changed `.tolower()` to `.lower()`. diff --git a/pulpcore/app/tasks/export.py b/pulpcore/app/tasks/export.py index ca312b3baa..e00ef68c8c 100644 --- a/pulpcore/app/tasks/export.py +++ b/pulpcore/app/tasks/export.py @@ -47,9 +47,9 @@ def _ensure_bool(value): if isinstance(value, bool): return value if isinstance(value, str): - if value.tolower() in ["yes", "y", "true", "t", "on", "1"]: + if value.lower() in ["yes", "y", "true", "t", "on", "1"]: return True - if value.tolower() in ["no", "n", "false", "f", "off", "0"]: + if value.lower() in ["no", "n", "false", "f", "off", "0"]: return False if value == 1: return True