Merge "Make DELETE request return 404 for nonexistant package"

This commit is contained in:
Jenkins 2014-05-29 14:28:33 +00:00 committed by Gerrit Code Review
commit 84bff3be68

View File

@ -346,7 +346,7 @@ def package_delete(package_id, context):
session = db_session.get_session() session = db_session.get_session()
with session.begin(): with session.begin():
package = session.query(models.Package).get(package_id) package = _package_get(package_id, session)
_authorize_package(package, context) _authorize_package(package, context)
session.delete(package) session.delete(package)