Skip to content

Commit

Permalink
fix: remove scheme when _external=False.
Browse files Browse the repository at this point in the history
  • Loading branch information
debben committed Oct 13, 2023
1 parent 5dae6f8 commit cb0ba82
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions galactory/api/v3/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def collections():
".collection",
namespace=colgroup.namespace,
collection=colgroup.name,
_external=False,
_scheme=scheme
_external=False
),
'name': colgroup.name,
'namespace': colgroup.namespace,
Expand All @@ -46,17 +45,15 @@ def collections():
".versions",
namespace=colgroup.latest.namespace,
collection=colgroup.latest.name,
_external=False,
_scheme=scheme,
_external=False
),
'highest_version': {
'href': url_for(
".version",
namespace=colgroup.latest.namespace,
collection=colgroup.latest.name,
version=colgroup.latest.version,
_external=False,
_scheme=scheme,
_external=False
),
"version": colgroup.latest.version,
},
Expand All @@ -66,7 +63,6 @@ def collections():
this_url = url_for(
".collections",
_external=False,
_scheme=scheme,
**request.args
)

Expand Down Expand Up @@ -134,8 +130,7 @@ def collection(namespace, collection):
".collection",
namespace=colgroup.namespace,
collection=colgroup.name,
_external=False,
_scheme=scheme
_external=False
),
'name': colgroup.latest.name,
'namespace': colgroup.latest.namespace,
Expand All @@ -146,17 +141,15 @@ def collection(namespace, collection):
".versions",
namespace=colgroup.latest.namespace,
collection=colgroup.latest.name,
_external=False,
_scheme=scheme,
_external=False
),
'highest_version': {
'href': url_for(
".version",
namespace=colgroup.latest.namespace,
collection=colgroup.latest.name,
version=colgroup.latest.version,
_external=False,
_scheme=scheme,
_external=False
),
"version": colgroup.latest.version,
},
Expand Down Expand Up @@ -200,8 +193,7 @@ def versions(namespace, collection):
namespace=i.namespace,
collection=i.name,
version=i.version,
_external=False,
_scheme=scheme,
_external=False
),
'version': i.version,
'created_at': i.created,
Expand All @@ -222,7 +214,6 @@ def versions(namespace, collection):
namespace=namespace,
collection=collection,
_external=False,
_scheme=scheme,
**request.args
)

Expand Down Expand Up @@ -283,8 +274,7 @@ def version(namespace, collection, version):
".collection",
namespace=info.namespace,
collection=info.name,
_external=False,
_scheme=scheme,
_external=False
),
'name': info.name,
},
Expand All @@ -304,8 +294,7 @@ def version(namespace, collection, version):
".collection",
namespace=info.namespace,
collection=info.name,
_external=False,
_scheme=scheme
_external=False
),
'id': 0,
'metadata': info.collection_info,
Expand Down Expand Up @@ -339,4 +328,4 @@ def publish():

upload_collection_from_hashed_tempfile(target, tmp, property_fallback=property_fallback)

return jsonify(task=url_for(".import_singleton", _external=False, _scheme=_scheme))
return jsonify(task=url_for(".import_singleton", _external=False))

Check warning on line 331 in galactory/api/v3/collections.py

View check run for this annotation

Codecov / codecov/patch

galactory/api/v3/collections.py#L331

Added line #L331 was not covered by tests

0 comments on commit cb0ba82

Please sign in to comment.