Project

General

Profile

Bug #7306

Sometimes in the API, we find_by_id and fail when other times we just call find

Added by David Davis almost 5 years ago. Updated 11 months ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
API
Target version:
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

History

#1 Updated by Brad Buckingham almost 5 years ago

The following is an example where this was observed:

api/v2/packages_controller.rb:

def find_repository
@repo = Repository.find(params[:repository_id])
fail HttpErrors::NotFound, _("Couldn't find repository '%s'") % params[:repository_id] if @repo.nil?
end

api/v2/errata_controller.rb:

def find_repository
@repo = Repository.find(params[:repository_id]) if params[:repository_id]
end

#2 Updated by Eric Helms almost 5 years ago

  • Triaged changed from No to Yes

#3 Updated by Eric Helms over 3 years ago

  • Legacy Backlogs Release (now unused) set to 114

Also available in: Atom PDF