Fix RemoveIn20Warning: Query.join(str)

RemovedIn20Warning: Using strings to indicate relationship names in Query.join() is deprecated and will be removed in SQLAlchemy 2.0.  Please use the class-bound attribute directly.
This commit is contained in:
Sergey Golitsynskiy
2022-01-12 17:02:33 -05:00
parent 74cc259bc0
commit df6cf535a2
+1 -1
View File
@@ -1394,7 +1394,7 @@ class DirectoryModelExportStore(ModelExportStore):
# Write datasets' attributes to file.
query = (sa_session.query(model.HistoryDatasetAssociation)
.filter(model.HistoryDatasetAssociation.history == history)
.join("dataset")
.join(model.Dataset)
.options(joinedload("dataset").joinedload("actions"))
.order_by(model.HistoryDatasetAssociation.hid)
.filter(model.Dataset.purged == expression.false()))