| Index: app/handlers/api/package_versions.py
|
| diff --git a/app/handlers/api/package_versions.py b/app/handlers/api/package_versions.py
|
| index 7ccc2f85289c0862b0bcc119fe339b6defefd9fe..1d963938454c6efbc7971f55703f2b062b054b94 100644
|
| --- a/app/handlers/api/package_versions.py
|
| +++ b/app/handlers/api/package_versions.py
|
| @@ -164,10 +164,13 @@ class PackageVersions(object):
|
| return ""
|
|
|
| @handlers.api(2)
|
| - def show(self, package_id, id, format):
|
| + def show(self, package_id, id, format=None):
|
| """Retrieve the document describing a package version."""
|
| - # The mapper thinks the final version digit is the format.
|
| - id = id + '.' + format
|
| + # The mapper expects anything past a period to be the format of the
|
| + # document, which is fine for "index.html" or "packages.json" but not
|
| + # for "1.2.3". It thinks "3" is the format, which is wrong, so we add it
|
| + # on here.
|
| + if format: id = id + '.' + format
|
| return json.dumps(
|
| handlers.request().package_version(id).as_dict(full=True))
|
|
|
|
|