Skip to content

Commit

Permalink
fix: add missing slash in entities uris
Browse files Browse the repository at this point in the history
resolves #415
  • Loading branch information
sennierer committed Jan 17, 2025
1 parent 7ab1add commit 0998ff3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions apis_ontology/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def to_representation(self, instance):
base_uri = getattr(
settings, "APIS_BASE_URI", self.context["request"].build_absolute_uri("/")
)
if not base_uri.endswith("/"):
base_uri += "/"

# Define namespaces
crm = Namespace("http://www.cidoc-crm.org/cidoc-crm/")
Expand Down Expand Up @@ -109,6 +111,8 @@ def to_representation(self, instance):
base_uri = getattr(
settings, "APIS_BASE_URI", self.context["request"].build_absolute_uri("/")
)
if not base_uri.endswith("/"):
base_uri += "/"

# Define namespaces
crm = Namespace("http://www.cidoc-crm.org/cidoc-crm/")
Expand Down Expand Up @@ -218,6 +222,8 @@ def to_representation(self, instance):
base_uri = getattr(
settings, "APIS_BASE_URI", self.context["request"].build_absolute_uri("/")
)
if not base_uri.endswith("/"):
base_uri += "/"

# Define namespaces
crm = Namespace("http://www.cidoc-crm.org/cidoc-crm/")
Expand Down

0 comments on commit 0998ff3

Please sign in to comment.