Unverified Commit 7e216fda authored by John Chilton's avatar John Chilton Committed by GitHub
Browse files

Merge pull request #20599 from jdavcs/24.1_objstore_set_attr

[24.1] Do not set attribute on a namedtuple
parents c9679269 8711543b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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}"
                    )
                    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