fixed 'destroy for nil class' warning in cucumber:
This commit is contained in:
parent
1c9ca738ae
commit
1b8257e960
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ class Retraction
|
|||
def perform receiving_user
|
||||
Rails.logger.debug "Performing retraction for #{post_guid}"
|
||||
self.target.unsocket_from_user receiving_user if target.respond_to? :unsocket_from_user
|
||||
self.target.destroy
|
||||
self.target.destroy if self.target
|
||||
Rails.logger.info("event=retraction status=complete type=#{self.type} guid=#{self.post_guid}")
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue