Skip to content

Commit

Permalink
always expand the record
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducica committed Oct 14, 2024
1 parent 19a7f44 commit b257b67
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions oarepo_ui/resources/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ class RecordsUIResourceConfig(UIResourceConfig):
request_export_args = {"export_format": ma.fields.Str()}
request_search_args = {"page": ma.fields.Integer(), "size": ma.fields.Integer()}
request_create_args = {"community": ma.fields.Str()}
request_extra_args = {
"expand": ma.fields.Boolean(),
}

app_contexts = None
ui_serializer = None
Expand Down
4 changes: 1 addition & 3 deletions oarepo_ui/resources/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
request_read_args,
request_search_args,
request_view_args,
request_extra_args,
)
from invenio_records_resources.services import LinksTemplate
from oarepo_runtime.datastreams.utils import get_file_service_for_record_class
Expand Down Expand Up @@ -188,7 +187,6 @@ def ui_model(self):
# helper function to avoid duplicating code between detail and preview handler
@request_read_args
@request_view_args
@request_extra_args
@response_header_signposting
def _detail(self, *, is_preview=False):
if is_preview:
Expand Down Expand Up @@ -324,7 +322,7 @@ def _get_record(self, resource_requestctx, allow_draft=False):
return read_method(
g.identity,
resource_requestctx.view_args["pid_value"],
expand=resource_requestctx.args.get("expand", False),
expand=True,
)
except PermissionDenied as e:
raise Forbidden() from e
Expand Down

0 comments on commit b257b67

Please sign in to comment.