Commit 77c5040483c11ad90662106643465e3c83e61576
1 parent
468d2b2e
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
prevent null pointer exception in smile block
Showing
1 changed file
with
0 additions
and
3 deletions
Show diff stats
plugins/serpro_integration/lib/serpro_integration_plugin/smile_block.rb
| ... | ... | @@ -33,9 +33,6 @@ class SerproIntegrationPlugin::SmileBlock < Block |
| 33 | 33 | #FIXME make this test |
| 34 | 34 | def smile_factor |
| 35 | 35 | collect_sonar_information |
| 36 | - factor = (self.sonar_info[METRIC_COVERAGE] * self.sonar_info[METRIC_SUCCESS_DENSITY]).to_f/1000 | |
| 37 | - factor | |
| 38 | - collect_sonar_information | |
| 39 | 36 | factor = 0 |
| 40 | 37 | if self.sonar_info[METRIC_COVERAGE] && self.sonar_info[METRIC_SUCCESS_DENSITY] |
| 41 | 38 | factor = (self.sonar_info[METRIC_COVERAGE] * self.sonar_info[METRIC_SUCCESS_DENSITY]).to_f/1000 | ... | ... |