CodeTriage
CodeTriage copied to clipboard
fix click_source_redirect method on doc_methods_controller
trafficstars
While making tests for the class (#943), I've noticed that this method wasn't working properly because of two errors:
- on line 36 the search for a
RepoSubscriptionwas not being made correctly, which would consequently lead to thesubvariable being nil. - on line 39 the
ifconditional was raising an error in case the condition wasn't met instead of just executing theelseinstruction. To fix it I've prevented the condition of raising an error.