8000 "resource_create" curl command is not working with right_time_context extension · Issue #17 · conwetlab/ckanext-right_time_context · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
"resource_create" curl command is not working with right_time_context extension #17
Open
@Nisha1293

Description

@Nisha1293

Issue Description:
I integrated a "ckanext-right_time_context" extnesion with CKAN.
When I executed the "resource_create" API, it returned the below error :

[Tue Aug 15 17:33:43.157707 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245]   return self._serialize_resource(resource)
[Tue Aug 15 17:33:43.157710 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245] File '/usr/lib/ckan/default/src/ckanext-right_time_context/ckanext/right_time_context/plugin.py', line 175 in _serialize_resource
[Tue Aug 15 17:33:43.157713 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245]   if resource['format'] == NGSI_REG_FORMAT:
[Tue Aug 15 17:33:43.157715 2023] [wsgi:error] [pid 137:tid 140601585772288] [remote 10.26.3.147:03245] KeyError: 'format'

Investigation:
On the investigation, I found that "format" key has not been passed in the curl command. As per the document "format" key is optional in resource_create API.

Further when I investigated in the right-time-context source code, I found that in the following file "/usr/lib/ckan/default/src/ckanext-right_time_context/ckanext/right_time_context/plugin.py" at line no 175, currently below condition is checked.

if resource['format'] == NGSI_REG_FORMAT:

When resource_create API is executed without "format" key, it returns the error because format key is not there.

Expected Behaviour:

resource_create API should be working without passing format key in the curl command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0