Skip to content

Commit

Permalink
Errbit | ConceptMap List | mappings without from/to-source-url fix
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Jun 10, 2024
1 parent fc71e82 commit b7b5dd4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/common/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def parse_identifier(accession_id):
@staticmethod
def convert_ocl_uri_to_fhir_url(uri, resource_type):
resource_type_uri = f"/{resource_type}/"
if uri.startswith('/orgs/') or uri.startswith('/users/'):
if uri and (uri.startswith('/orgs/') or uri.startswith('/users/')):
# Recognize OCL API relative URI
uri = uri.replace('/sources/', resource_type_uri).replace('/collections/', resource_type_uri)
uri = uri.strip('/')
Expand Down
2 changes: 1 addition & 1 deletion core/concept_maps/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def to_representation(self, value):
mappings = value.get_mappings_queryset().order_by('id')[:limit]
groups = {}
for mapping in mappings:
key = mapping.from_source_url + mapping.to_source_url
key = (mapping.from_source_url or '') + (mapping.to_source_url or '')
group = groups.get(key)
if not group:
if mapping.from_source and mapping.from_source.canonical_url:
Expand Down

0 comments on commit b7b5dd4

Please sign in to comment.