-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SqliteDosStorage
: Fix exception when importing archive (#6359)
When an archive was imported into an `SqliteDosStorage` backend an exception was raised by sqlalchemy. It was treating the `uuid` column of the models as a UUID type but in reality it was a string. This is because the storage plugin inherits the implementation largely from the `core.psql_dos` plugin, but it converts the models, since the UUID types that are used by the PostgreSQL implementation are not supported by SQLite. The problem was that for archive importing, the `bulk_insert` method was used, which calls the `_get_mapper_from_entity` method to map a given ORM entity to the corresponding database model. But since this method was inherited from `core.psql_dos`, it was returning the incorrect models. The problem is fixed by overriding it in `SqliteDosStorage` and returning the SQLite-adapted models.
- Loading branch information
Showing
3 changed files
with
44 additions
and
12 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