Skip to content

Commit

Permalink
fix: data schema
Browse files Browse the repository at this point in the history
Fixed schema for links rather than details on ObservedFile responses and for `destroy` property of Permissions.
  • Loading branch information
mjaquiery committed Oct 29, 2024
1 parent c992a47 commit aaa077f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend_django/galv/serializers/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pathlib import Path
import re
import tempfile
from typing import Union

import jsonschema
from django.conf import settings
Expand Down Expand Up @@ -2062,21 +2061,21 @@ class ObservedFileSerializer(
help_text="First few rows of this file's data"
)

def get_applicable_mappings(self, instance) -> str:
def get_applicable_mappings(self, instance):
return reverse(
"observedfile-applicable-mappings",
args=[instance.pk],
request=self.context.get("request"),
)

def get_extra_metadata(self, instance) -> Union[dict, None]:
def get_extra_metadata(self, instance):
return reverse(
"observedfile-extra-metadata",
args=[instance.pk],
request=self.context.get("request"),
)

def get_summary(self, instance) -> Union[dict, None]:
def get_summary(self, instance):
return reverse(
"observedfile-summary",
args=[instance.pk],
Expand Down
1 change: 1 addition & 0 deletions backend_django/galv/serializers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def __init__(self, *args, **kwargs):
"read": {"type": "boolean"},
"write": {"type": "boolean"},
"create": {"type": "boolean"},
"destroy": {"type": "boolean"},
},
}
)
Expand Down

0 comments on commit aaa077f

Please sign in to comment.