-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the validation of links in archive import (#3354)
The import logic imports the links after all the nodes have been imported. The link validation, however, was incorrect. It included link types only implicitly and `CALL` links were not even considered. Instead of the convoluted nested try-except blocks, the `validate_link` utility from `aiida.orm.utils.links` is used instead. This might not be the most efficient way, since it goes through the front-end ORM but at least we know it is correct. Unfortunately, for Django, the validation cannot be done through the front-end infrastructure because the query builder will go through the SqlAlchemy, but the nodes that have been added during the import will not be present in it, as they are managed by the Django transaction. The only solution then is to perform the link validation manually.
- Loading branch information
Showing
4 changed files
with
235 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.