You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a few places where multiple database operations that must be executed together are not under transaction:
Automatic insert of Follow when creating a new Post (posts_controller.rb, action create)
Automatic insert of PostStatusChange when updating a Post (posts_controller.rb, action update)
Put these operations under transaction so that, if one of them fails, everything is reverted back. Consider putting the logic in a workflow (see app/workflows for examples) to avoid cluttering the controllers too much.
The text was updated successfully, but these errors were encountered:
riggraz
added
ruby
Issues that require ruby knowledge and pull requests that update Ruby code
refactoring
Refactoring, cleanups, technical debt reduction
labels
Oct 25, 2022
There are a few places where multiple database operations that must be executed together are not under transaction:
posts_controller.rb
, actioncreate
)posts_controller.rb
, actionupdate
)Put these operations under transaction so that, if one of them fails, everything is reverted back. Consider putting the logic in a workflow (see
app/workflows
for examples) to avoid cluttering the controllers too much.The text was updated successfully, but these errors were encountered: