Skip to content

Commit

Permalink
[Fixes #66] Bug: not for all geonode object types we are able to run …
Browse files Browse the repository at this point in the history
…--filter
  • Loading branch information
mwallschlaeger committed Jun 27, 2024
1 parent 11c7e59 commit 0e86c7e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ show all datasets:

patch dataset:
```
geonodectl ds patch 36 --set 'category={"identifier": "farming"}'
geonodectl ds patch 36 --set '{"category":{"identifier":"biota"}}'
...
```

Expand Down
7 changes: 7 additions & 0 deletions geonodectl
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ To use this tool you have to set the following environment variables before star
datasets_list = datasets_subparsers.add_parser("list", help="list datasets")
datasets_list.add_argument(
"--filter",
nargs="*",
action=kwargs_append_action,
dest="filter",
type=str,
Expand Down Expand Up @@ -284,6 +285,7 @@ To use this tool you have to set the following environment variables before star
documents_list = documents_subparsers.add_parser("list", help="list documents")
documents_list.add_argument(
"--filter",
nargs="*",
action=kwargs_append_action,
dest="filter",
type=str,
Expand Down Expand Up @@ -358,6 +360,7 @@ To use this tool you have to set the following environment variables before star
maps_list = maps_subparsers.add_parser("list", help="list documents")
maps_list.add_argument(
"--filter",
nargs="*",
action=kwargs_append_action,
dest="filter",
type=str,
Expand Down Expand Up @@ -435,6 +438,7 @@ To use this tool you have to set the following environment variables before star
geoapps_list = geoapps_subparsers.add_parser("list", help="list geoapps")
geoapps_list.add_argument(
"--filter",
nargs="*",
action=kwargs_append_action,
dest="filter",
type=str,
Expand Down Expand Up @@ -531,6 +535,7 @@ To use this tool you have to set the following environment variables before star
users_list = users_subparsers.add_parser("list", help="list documents")
users_list.add_argument(
"--filter",
nargs="*",
action=kwargs_append_action,
dest="filter",
type=str,
Expand Down Expand Up @@ -618,6 +623,7 @@ To use this tool you have to set the following environment variables before star
uploads_list = uploads_subparsers.add_parser("list", help="list uploads")
uploads_list.add_argument(
"--filter",
nargs="*",
action=kwargs_append_action,
dest="filter",
type=str,
Expand All @@ -640,6 +646,7 @@ To use this tool you have to set the following environment variables before star
)
executionrequest_list.add_argument(
"--filter",
nargs="*",
action=kwargs_append_action,
dest="filter",
type=str,
Expand Down
3 changes: 2 additions & 1 deletion geonoderest/executionrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
from geonoderest.geonodetypes import GeonodeCmdOutListKey, GeonodeCmdOutObjectKey
from geonoderest.rest import GeonodeRest
from geonoderest.cmdprint import print_list_on_cmd, print_json
from geonoderest.resources import GeonodeResourceHandler


class GeonodeExecutionRequestHandler(GeonodeRest):
class GeonodeExecutionRequestHandler(GeonodeResourceHandler):
ENDPOINT_NAME = "executionrequest"
JSON_OBJECT_NAME = "requests"
SINGULAR_RESOURCE_NAME = "request"
Expand Down
1 change: 0 additions & 1 deletion geonoderest/geonodeobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def list(self, **kwargs) -> Dict:
endpoint = f"{self.ENDPOINT_NAME}/"

params = self.__handle_http_params__({}, kwargs)

r = self.http_get(endpoint=endpoint, params=params)
return r[self.JSON_OBJECT_NAME]

Expand Down
7 changes: 7 additions & 0 deletions json-examples/keywords.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"keywords": [
{
"name": "test"
}
]
}
5 changes: 5 additions & 0 deletions json-examples/license.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"license": {
"identifier": "CC-0"
}
}

0 comments on commit 0e86c7e

Please sign in to comment.