Skip to content

Commit

Permalink
[api] packages not found can't have a diff
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Nov 8, 2012
1 parent a13d786 commit 1aa5ecd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/api/app/models/bs_request_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ def sourcediff(opts = {})
# FIXME this is code duplicated in the webui for package diffs - this needs to move into the API to then
# move into helpers
def webui_infos
sd = self.sourcediff(view: 'xml', withissues: true)
begin
sd = self.sourcediff(view: 'xml', withissues: true)
rescue Suse::Backend::NotFoundError => e
end
return {} if sd.blank?
# Sort files into categories by their ending and add all of them to a hash. We
# will later use the sorted and concatenated categories as key index into the per action file hash.
Expand Down

0 comments on commit 1aa5ecd

Please sign in to comment.