From 10433f4ecdfcb00615db41de92e0743ca8227abc Mon Sep 17 00:00:00 2001 From: Nisha1293 <89568228+Nisha1293@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:46:58 +0530 Subject: [PATCH] In plugin.py, there is an fix of resource format key error This is the fix of resource format key error --- ckanext/xloader/plugin.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ckanext/xloader/plugin.py b/ckanext/xloader/plugin.py index e0ce027e..05d629c8 100644 --- a/ckanext/xloader/plugin.py +++ b/ckanext/xloader/plugin.py @@ -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"):