Skip to content

Commit 7e216fd

Browse files
authored
Merge pull request #20599 from jdavcs/24.1_objstore_set_attr
[24.1] Do not set attribute on a namedtuple
2 parents c967926 + 8711543 commit 7e216fd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/galaxy/objectstore/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,11 @@ def __get_store_id_for(self, obj, **kwargs):
13501350
log.warning(
13511351
f"{obj.__class__.__name__} object with ID {obj.id} found in backend object store with ID {id}"
13521352
)
1353-
obj.object_store_id = id
1353+
try:
1354+
obj.object_store_id = id
1355+
except AttributeError:
1356+
# obj is likely a namedtuple (/scripts/cleanup_datasets/pgcleanup.py::RemovesDatasets)
1357+
log.info("Unable to set object_store_id on a readonly dataset object: %s", obj)
13541358
return id
13551359
return None
13561360

0 commit comments

Comments
 (0)