diff --git a/data/irve-statique.json.gz b/data/irve-statique.json.gz index ffa71fe8..6e09b4f7 100644 Binary files a/data/irve-statique.json.gz and b/data/irve-statique.json.gz differ diff --git a/data/irve-statique.parquet b/data/irve-statique.parquet index fbe22e16..2dec02a8 100644 Binary files a/data/irve-statique.parquet and b/data/irve-statique.parquet differ diff --git a/src/api/CHANGELOG.md b/src/api/CHANGELOG.md index a462790a..dfcdea44 100644 --- a/src/api/CHANGELOG.md +++ b/src/api/CHANGELOG.md @@ -8,6 +8,12 @@ and this project adheres to ## [Unreleased] +## [0.12.1] - 2024-09-09 + +### Fixed + +- Commit `/statique/bulk` database transaction + ## [0.12.0] - 2024-09-05 ### Added @@ -177,7 +183,8 @@ and this project adheres to - Implement base FastAPI app -[unreleased]: https://github.com/MTES-MCT/qualicharge/compare/v0.12.0...main +[unreleased]: https://github.com/MTES-MCT/qualicharge/compare/v0.12.1...main +[0.12.1]: https://github.com/MTES-MCT/qualicharge/compare/v0.12.0...v0.12.1 [0.12.0]: https://github.com/MTES-MCT/qualicharge/compare/v0.11.0...v0.12.0 [0.11.0]: https://github.com/MTES-MCT/qualicharge/compare/v0.10.0...v0.11.0 [0.10.0]: https://github.com/MTES-MCT/qualicharge/compare/v0.9.0...v0.10.0 diff --git a/src/api/pyproject.toml b/src/api/pyproject.toml index 7d6b27d5..670e146c 100644 --- a/src/api/pyproject.toml +++ b/src/api/pyproject.toml @@ -3,7 +3,7 @@ # [project] name = "qualicharge" -version = "0.12.0" +version = "0.12.1" # Third party packages configuration [tool.coverage.run] diff --git a/src/api/qualicharge/__init__.py b/src/api/qualicharge/__init__.py index 23e91725..4ce4304d 100644 --- a/src/api/qualicharge/__init__.py +++ b/src/api/qualicharge/__init__.py @@ -1,3 +1,3 @@ """QualiCharge package root.""" -__version__ = "0.12.0" +__version__ = "0.12.1" diff --git a/src/api/qualicharge/api/v1/routers/static.py b/src/api/qualicharge/api/v1/routers/static.py index 09bd4fc3..7d1fceda 100644 --- a/src/api/qualicharge/api/v1/routers/static.py +++ b/src/api/qualicharge/api/v1/routers/static.py @@ -280,7 +280,6 @@ async def bulk( transaction = session.begin_nested() try: importer.save() - transaction.commit() except ( ProgrammingError, IntegrityError, @@ -293,4 +292,7 @@ async def bulk( status_code=status.HTTP_404_NOT_FOUND, detail=str(err) ) from err + # Commit changes + session.commit() + return StatiqueItemsCreatedResponse(items=df["id_pdc_itinerance"])