Skip to content

Fix PersistenceStrategy to wrap ModuleResult creation in transaction#218

Merged
rafamanzo merged 2 commits intomasterfrom
persistence_strategy_module_result_transaction
Jul 19, 2016
Merged

Fix PersistenceStrategy to wrap ModuleResult creation in transaction#218
rafamanzo merged 2 commits intomasterfrom
persistence_strategy_module_result_transaction

Conversation

@danielkza
Copy link
Copy Markdown
Contributor

We don't want possible inconsistencies by allowing the KalibroModule to
become visible without it's corresponding ModuleResult.

We don't want possible inconsistencies by allowing the KalibroModule to
become visible without it's corresponding ModuleResult.
@danielkza
Copy link
Copy Markdown
Contributor Author

danielkza commented Jul 19, 2016

Split off from #215.

if !module_result.nil?
module_result
else
kalibro_module.build_module_result(processing: @processing)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice usage of ActiveRecord's builtin method.

@rafamanzo
Copy link
Copy Markdown
Member

Could you add a CHANGELOG entry for this fix?

@rafamanzo rafamanzo merged commit ea7b847 into master Jul 19, 2016
@rafamanzo rafamanzo deleted the persistence_strategy_module_result_transaction branch July 19, 2016 21:52
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.

2 participants