oarepo-runtime 2.0.0.dev31__py3-none-any.whl → 2.0.0.dev32__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- oarepo_runtime/__init__.py +1 -1
 - oarepo_runtime/services/records/links.py +18 -4
 - {oarepo_runtime-2.0.0.dev31.dist-info → oarepo_runtime-2.0.0.dev32.dist-info}/METADATA +1 -1
 - {oarepo_runtime-2.0.0.dev31.dist-info → oarepo_runtime-2.0.0.dev32.dist-info}/RECORD +7 -7
 - {oarepo_runtime-2.0.0.dev31.dist-info → oarepo_runtime-2.0.0.dev32.dist-info}/WHEEL +0 -0
 - {oarepo_runtime-2.0.0.dev31.dist-info → oarepo_runtime-2.0.0.dev32.dist-info}/entry_points.txt +0 -0
 - {oarepo_runtime-2.0.0.dev31.dist-info → oarepo_runtime-2.0.0.dev32.dist-info}/licenses/LICENSE +0 -0
 
    
        oarepo_runtime/__init__.py
    CHANGED
    
    
| 
         @@ -11,6 +11,8 @@ 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
            from __future__ import annotations
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
      
 14 
     | 
    
         
            +
            from typing import Any, override
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
       14 
16 
     | 
    
         
             
            from invenio_records_resources.services.base.links import EndpointLink
         
     | 
| 
       15 
17 
     | 
    
         | 
| 
       16 
18 
     | 
    
         | 
| 
         @@ -28,16 +30,28 @@ def rdm_pagination_record_endpoint_links(endpoint: str, params: list[str] | None 
     | 
|
| 
       28 
30 
     | 
    
         
             
                service but not in invenio_drafts_resources service, where the parameter is
         
     | 
| 
       29 
31 
     | 
    
         
             
                called "id" instead of "pid_value". That is why this function is called rdm_...
         
     | 
| 
       30 
32 
     | 
    
         
             
                """
         
     | 
| 
       31 
     | 
    
         
            -
                params = [*(params or []), " 
     | 
| 
      
 33 
     | 
    
         
            +
                params = [*(params or []), "id"]
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                class RecordEndpointLinkWithId(EndpointLink):
         
     | 
| 
      
 36 
     | 
    
         
            +
                    @override
         
     | 
| 
      
 37 
     | 
    
         
            +
                    @staticmethod
         
     | 
| 
      
 38 
     | 
    
         
            +
                    def vars(obj: Any, vars: dict[str, Any]) -> None:
         
     | 
| 
      
 39 
     | 
    
         
            +
                        pid_value = vars.pop("pid_value", None)
         
     | 
| 
      
 40 
     | 
    
         
            +
                        if pid_value is not None:
         
     | 
| 
      
 41 
     | 
    
         
            +
                            vars["id"] = pid_value
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
       32 
43 
     | 
    
         
             
                return {
         
     | 
| 
       33 
     | 
    
         
            -
                    "prev":  
     | 
| 
      
 44 
     | 
    
         
            +
                    "prev": RecordEndpointLinkWithId(
         
     | 
| 
       34 
45 
     | 
    
         
             
                        endpoint,
         
     | 
| 
       35 
46 
     | 
    
         
             
                        when=lambda pagination, _ctx: pagination.has_prev,
         
     | 
| 
       36 
47 
     | 
    
         
             
                        vars=lambda pagination, _vars: _vars["args"].update({"page": pagination.prev_page.page}),
         
     | 
| 
       37 
48 
     | 
    
         
             
                        params=params,
         
     | 
| 
       38 
49 
     | 
    
         
             
                    ),
         
     | 
| 
       39 
     | 
    
         
            -
                    "self":  
     | 
| 
       40 
     | 
    
         
            -
             
     | 
| 
      
 50 
     | 
    
         
            +
                    "self": RecordEndpointLinkWithId(
         
     | 
| 
      
 51 
     | 
    
         
            +
                        endpoint,
         
     | 
| 
      
 52 
     | 
    
         
            +
                        params=params,
         
     | 
| 
      
 53 
     | 
    
         
            +
                    ),
         
     | 
| 
      
 54 
     | 
    
         
            +
                    "next": RecordEndpointLinkWithId(
         
     | 
| 
       41 
55 
     | 
    
         
             
                        endpoint,
         
     | 
| 
       42 
56 
     | 
    
         
             
                        when=lambda pagination, _ctx: pagination.has_next,
         
     | 
| 
       43 
57 
     | 
    
         
             
                        vars=lambda pagination, _vars: _vars["args"].update({"page": pagination.next_page.page}),
         
     | 
| 
         @@ -1,4 +1,4 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            oarepo_runtime/__init__.py,sha256= 
     | 
| 
      
 1 
     | 
    
         
            +
            oarepo_runtime/__init__.py,sha256=KfYo8NvRdAHBVai7t596N-WaBjCB0W_3VyMuPuNfAg4,686
         
     | 
| 
       2 
2 
     | 
    
         
             
            oarepo_runtime/api.py,sha256=tLPgKv1iao2ZeL0tTJeA85019_sMW_dQAleayOeXjgI,14200
         
     | 
| 
       3 
3 
     | 
    
         
             
            oarepo_runtime/config.py,sha256=RUEPFn_5bKp9Wb0OY-Fb3VK30m35vF5IsLjYaQHhP3g,3838
         
     | 
| 
       4 
4 
     | 
    
         
             
            oarepo_runtime/ext.py,sha256=NgiRNl_hwTvEWcXnNwVh_XCPJyvwr3dZkdPmkWvN1xo,8785
         
     | 
| 
         @@ -35,14 +35,14 @@ oarepo_runtime/services/facets/params.py,sha256=8ZFDeTUPDV3d9cdIIECo5F38KQ28h1eG 
     | 
|
| 
       35 
35 
     | 
    
         
             
            oarepo_runtime/services/facets/utils.py,sha256=z4RcBqM4_QfTSMY-mf8yhL18bhHg5XwzHmqV6mLtzvs,2251
         
     | 
| 
       36 
36 
     | 
    
         
             
            oarepo_runtime/services/records/__init__.py,sha256=Mpohx3xEXTmoodTEHbCih6I97JIofgqa_bf_Ysq4e2g,446
         
     | 
| 
       37 
37 
     | 
    
         
             
            oarepo_runtime/services/records/custom_fields.py,sha256=Yp3WsLYq1_OPMmJvpxCDtZi9IhuxHsBFPor8q901qn0,1417
         
     | 
| 
       38 
     | 
    
         
            -
            oarepo_runtime/services/records/links.py,sha256= 
     | 
| 
      
 38 
     | 
    
         
            +
            oarepo_runtime/services/records/links.py,sha256=v9HFSJ047uchgvjB2sBdjsGTo2jDY4rARfIZVxI5tEY,3106
         
     | 
| 
       39 
39 
     | 
    
         
             
            oarepo_runtime/services/records/mapping.py,sha256=y3oeToKEnaRYpMV3q2-2cXNzyzyL3XXGvY26BifybpE,1332
         
     | 
| 
       40 
40 
     | 
    
         
             
            oarepo_runtime/services/schema/__init__.py,sha256=jgAPI_uKC6Ug4KQWnwQVg3-aNaw-eHja323AUFo5ELo,351
         
     | 
| 
       41 
41 
     | 
    
         
             
            oarepo_runtime/services/schema/i18n.py,sha256=9D1zOQaPKAnYzejB0vO-m2BJYnam0N0Lrq4jID7twfE,3174
         
     | 
| 
       42 
42 
     | 
    
         
             
            oarepo_runtime/services/schema/i18n_ui.py,sha256=DbusphhGDeaobTt4nuwNgKZ6Houlu4Sv3SuMGkdjRRY,3582
         
     | 
| 
       43 
43 
     | 
    
         
             
            oarepo_runtime/services/schema/ui.py,sha256=Y_jBO-fowkpOgceWz8aqJSJAUiAnKLGSIuNpjNLnp8Q,4612
         
     | 
| 
       44 
     | 
    
         
            -
            oarepo_runtime-2.0.0. 
     | 
| 
       45 
     | 
    
         
            -
            oarepo_runtime-2.0.0. 
     | 
| 
       46 
     | 
    
         
            -
            oarepo_runtime-2.0.0. 
     | 
| 
       47 
     | 
    
         
            -
            oarepo_runtime-2.0.0. 
     | 
| 
       48 
     | 
    
         
            -
            oarepo_runtime-2.0.0. 
     | 
| 
      
 44 
     | 
    
         
            +
            oarepo_runtime-2.0.0.dev32.dist-info/METADATA,sha256=N7fZZvQfa7cDfzMWVzD6yv-ru126lrQt8C9JiL-SV-0,4723
         
     | 
| 
      
 45 
     | 
    
         
            +
            oarepo_runtime-2.0.0.dev32.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
         
     | 
| 
      
 46 
     | 
    
         
            +
            oarepo_runtime-2.0.0.dev32.dist-info/entry_points.txt,sha256=rOfs8R1oXFN_dLH9zAZ6ydkvr83mDajegc6NBIRsCMQ,318
         
     | 
| 
      
 47 
     | 
    
         
            +
            oarepo_runtime-2.0.0.dev32.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
         
     | 
| 
      
 48 
     | 
    
         
            +
            oarepo_runtime-2.0.0.dev32.dist-info/RECORD,,
         
     | 
| 
         
            File without changes
         
     | 
    
        {oarepo_runtime-2.0.0.dev31.dist-info → oarepo_runtime-2.0.0.dev32.dist-info}/entry_points.txt
    RENAMED
    
    | 
         
            File without changes
         
     | 
    
        {oarepo_runtime-2.0.0.dev31.dist-info → oarepo_runtime-2.0.0.dev32.dist-info}/licenses/LICENSE
    RENAMED
    
    | 
         
            File without changes
         
     |