Skip to content

Commit

Permalink
In plugin.py, there is an fix of resource format key error
Browse files Browse the repository at this point in the history
This is the fix of resource format key error
  • Loading branch information
Nisha1293 authored Feb 28, 2024
1 parent 67fabfc commit 10433f4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ckanext/xloader/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ def after_update(self, context, resource_dict):

def _submit_to_xloader(self, resource_dict):
context = {"ignore_auth": True, "defer_commit": True}
if not XLoaderFormats.is_it_an_xloader_format(resource_dict["format"]):
resource_format = resource_dict.get("format")
if not XLoaderFormats.is_it_an_xloader_format(resource_format):
log.debug(
"Skipping xloading resource {id} because "
'format "{format}" is not configured to be '
"xloadered".format(**resource_dict)
f"Skipping xloading resource {resource_dict['id']} because "
f'format "{resource_format}" is not configured to be '
"xloadered"
)
return
if resource_dict["url_type"] in ("datapusher", "xloader"):
Expand Down

0 comments on commit 10433f4

Please sign in to comment.