Skip to content

Commit b69bb8a

Browse files
committed
Add missing get_full_path function and import
1 parent 8a0de1b commit b69bb8a

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

pulp_container/app/registry_api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
determine_media_type,
8282
extract_data_from_signature,
8383
filter_resource,
84+
get_full_path,
8485
has_task_completed,
8586
validate_manifest,
8687
)

pulp_container/app/utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from functools import partial
88

99
from asgiref.sync import sync_to_async
10+
from django.conf import settings
1011
from django.db import IntegrityError
1112
from jsonschema import Draft7Validator, ValidationError, validate
1213
from pysequoia.packet import PacketPile, Tag
@@ -34,6 +35,13 @@
3435
log = logging.getLogger(__name__)
3536

3637

38+
def get_full_path(base_path, pulp_domain=None):
39+
if settings.DOMAIN_ENABLED:
40+
domain = pulp_domain or get_domain()
41+
return f"{domain.name}/{base_path}"
42+
return base_path
43+
44+
3745
def get_accepted_media_types(headers):
3846
"""
3947
Returns a list of media types from the Accept headers.

0 commit comments

Comments
 (0)