diff options
author | Benjamin Neff <benjamin@coding4coffee.ch> | 2016-05-16 20:57:30 +0300 |
---|---|---|
committer | Benjamin Neff <benjamin@coding4coffee.ch> | 2016-06-26 07:21:00 +0300 |
commit | 581f8d7226e79734f594d13452cd5861aecb5311 (patch) | |
tree | 1e7a855ffbf965af4135431d6a08c857ad81b95b /app/controllers | |
parent | 102e2a083424c66f0b6cbceb019e6bb2ea7b694a (diff) |
don't force remove contact on block
this creates inconsistent states, if you remove the block in the future
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/blocks_controller.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/blocks_controller.rb b/app/controllers/blocks_controller.rb index bcea0e561..dd5cb4ae9 100644 --- a/app/controllers/blocks_controller.rb +++ b/app/controllers/blocks_controller.rb @@ -35,9 +35,7 @@ class BlocksController < ApplicationController private def disconnect_if_contact(person) - if contact = current_user.contact_for(person) - current_user.disconnect(contact, :force => true) - end + current_user.contact_for(person).try {|contact| current_user.disconnect(contact) } end def block_params |