Skip to content

Conversation

@Yangeok
Copy link

@Yangeok Yangeok commented May 9, 2024

Hello, manukanne.

Found your blog posts and code repository very helpful for implementing DDD with fastapi, sqlmodel. I've been using the uow related code as-is, but I noticed that the rollback keeps getting executed. Upon investigation, I found some suggested code improvements, so I'll be sending a PR.

Modified the code rollback is only executed in the method __exit__ when an exception occurs.

Thanks again. Have a great day.


def __exit__(self, exc_type, exc_value, traceback):
self.rollback()
if exc_type:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added conditional statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant