Always set item.history to self

What I've observed is that for a job with a immediate post job action
(e.g setting a dataset tag within https://github.com/galaxyproject/galaxy/blob/202bff420761c63fc30ac933630d72dd40496248/lib/galaxy_test/api/test_workflows.py#L3605)
something is resetting hda.history_id. I have no idea how this happens.
Possibly https://github.com/galaxyproject/galaxy/blob/f66520e4a6f6b71516c48861f473c1b430ad967f/lib/galaxy/tools/actions/__init__.py#L557
fetches a new HDA from a different sqlalchemy session and modifies it ??
This commit is contained in:
mvdbeek
2021-10-18 11:42:40 +02:00
parent b4befd02b5
commit bf7cc9072c
+1 -2
View File
@@ -2419,10 +2419,9 @@ class History(Base, HasTags, Dictifiable, UsesAnnotations, HasName, RepresentByI
def stage_addition(self, items):
history_id = self.id
for item in listify(items):
item.history = self
if history_id:
item.history_id = history_id
else:
item.history = self
self._pending_additions.append(item)
@property