Simplify PackageType

This commit is contained in:
rubenwardy
2018-03-20 04:11:50 +00:00
parent 363f9d8016
commit 623ca3da07
2 changed files with 15 additions and 35 deletions

View File

@@ -36,7 +36,7 @@ def getPageByInfo(type, author, name):
abort(404)
package = Package.query.filter_by(name=name, author_id=user.id,
type=PackageType.fromName(type)).first()
type=PackageType[type.upper()]).first()
if package is None:
abort(404)