generated from V3lop5/python-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
code qualityWould improve code qualityWould improve code qualityenhancementNew feature or requestNew feature or request
Description
Describe the solution you'd like
Currently a database session is handed over to crud operations. Inside a crud operation one or two commits are made.
This may result in data inconsistency.
Example:
Calling crud.energy_source.create will call crud.energy_component.create and completes one transaction (commit) inside. Another transaction is handled inside crud.energy_source.create. If second transaction fails the first one is still executed.
In order to resolve this, every endpoint request should be handled as one transaction. All crud operations inside get rolled back, if one error occurs.
Additional context
Nothing for now
Metadata
Metadata
Assignees
Labels
code qualityWould improve code qualityWould improve code qualityenhancementNew feature or requestNew feature or request