Skip to content

Commit

Permalink
Merge pull request ckan#209 from Nisha1293/Nisha1293-format-key-fix
Browse files Browse the repository at this point in the history
In plugin.py, there is an fix of resource format key error if null
  • Loading branch information
duttonw authored Jul 2, 2024
2 parents a27b993 + 10433f4 commit 3a865ac
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 3a865ac

Please sign in to comment.