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"):