Skip to content

Commit

Permalink
Fix SA2.0 syntax, fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavcs committed Jul 21, 2023
1 parent cf44aee commit 25cc282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
hda_id = int(args.hda_id)
except Exception:
hda_id = int(helper.decode_id(args.hda_id))
hda = model.context.current.query(model.HistoryDatasetAssociation).get(hda_id)
hda = model.session.get(model.HistoryDatasetAssociation, hda_id)
print(f'HDA "{hda.id}" is Dataset "{hda.dataset.id}" at: {hda.file_name}')

if args.ldda_id:
try:
ldda_id = int(args.ldda_id)
except Exception:
ldda_id = int(helper.decode_id(args.ldda_id))
ldda = model.context.current.query(model.HistoryDatasetAssociation).get(ldda_id)
ldda = model.session.get(model.LibraryDatasetDatasetAssociation, ldda_id)
print(f'LDDA "{ldda.id}" is Dataset "{ldda.dataset.id}" at: {ldda.file_name}')

0 comments on commit 25cc282

Please sign in to comment.