Merge pull request #20599 from jdavcs/24.1_objstore_set_attr

[24.1] Do not set attribute on a namedtuple
This commit is contained in:
John Chilton
2025-07-07 09:55:11 -04:00
committed by GitHub
+5 -1
View File
@@ -1350,7 +1350,11 @@ class DistributedObjectStore(NestedObjectStore):
log.warning(
f"{obj.__class__.__name__} object with ID {obj.id} found in backend object store with ID {id}"
)
obj.object_store_id = id
try:
obj.object_store_id = id
except AttributeError:
# obj is likely a namedtuple (/scripts/cleanup_datasets/pgcleanup.py::RemovesDatasets)
log.info("Unable to set object_store_id on a readonly dataset object: %s", obj)
return id
return None