prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Org Admin:  Dataset management page is broken
  Log in as a sysadmin user.
  Go to:
  http://data.hdx.rwlabs.org/organization/bulk_process/ocha-fiss-geneva
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py`
  Content:
  ```
  1 import logging
  2 import ckan.plugins as plugins
  3 import ckan.plugins.toolkit as tk
  4 import ckan.lib.plugins as lib_plugins
  5 
  6 class HDXOrgFormPlugin(plugins.SingletonPlugin, lib_plugins.DefaultOrganizationForm):
  7     plugins.implements(plugins.IConfigurer, inherit=False)
  8     plugins.implements(plugins.IRoutes, inherit=True)
  9     plugins.implements(plugins.IGroupForm, inherit=False)
  10     plugins.implements(plugins.ITemplateHelpers, inherit=False)
  11 
  12     num_times_new_template_called = 0
  13     num_times_read_template_called = 0
  14     num_times_edit_template_called = 0
  15     num_times_search_template_called = 0
  16     num_times_history_template_called = 0
  17     num_times_package_form_called = 0
  18     num_times_check_data_dict_called = 0
  19     num_times_setup_template_variables_called = 0
  20 
  21     def update_config(self, config):
  22         tk.add_template_directory(config, 'templates')
  23 
  24     def get_helpers(self):
  25         return {}
  26 
  27     def is_fallback(self):
  28         return False
  29 
  30     def group_types(self):
  31         return ['organization']
  32 
  33     def _modify_group_schema(self, schema):
  34         schema.update({
  35                 'description':[tk.get_validator('not_empty')],
  36                 'org_url':[tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')],
  37                 })
  38         return schema
  39 
  40     def form_to_db_schema(self):
  41         schema = super(HDXOrgFormPlugin, self).form_to_db_schema()
  42         schema = self._modify_group_schema(schema)
  43         return schema
  44         
  45 #     def check_data_dict(self, data_dict):
  46 #         return super(HDXOrgFormPlugin, self).check_data_dict(self, data_dict)
  47     
  48     def db_to_form_schema(self):
  49         # There's a bug in dictionary validation when form isn't present
  50         if tk.request.urlvars['action'] == 'index' or tk.request.urlvars['action'] == 'edit' or tk.request.urlvars['action'] == 'new':
  51             schema = super(HDXOrgFormPlugin, self).form_to_db_schema()
  52             schema.update({'description':[tk.get_validator('not_empty')] })
  53             schema.update({'org_url':[tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')]})
  54             return schema
  55         else:
  56             return None
  57 
  58     def before_map(self, map):
  59         map.connect('user_dashboard', '/dashboard', controller='ckanext.hdx_orgs.dashboard:DashboardController', action='dashboard',
  60                   ckan_icon='list')
  61         return map
  62
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py b/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py
  --- a/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py
  +++ b/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py
  @@ -58,4 +58,6 @@
       def before_map(self, map):
           map.connect('user_dashboard', '/dashboard', controller='ckanext.hdx_orgs.dashboard:DashboardController', action='dashboard',
                     ckan_icon='list')
  +        map.connect('organization_bulk_process', '/organization/bulk_process/{org_id}', controller='organization', action='index')
  +        map.connect('organization_bulk_process_no_id', '/organization/bulk_process', controller='organization', action='index')
           return map
  
verification_info: {"golden_diff": "diff --git a/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py b/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py\n--- a/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py\n+++ b/ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py\n@@ -58,4 +58,6 @@\n     def before_map(self, map):\n         map.connect('user_dashboard', '/dashboard', controller='ckanext.hdx_orgs.dashboard:DashboardController', action='dashboard',\n                   ckan_icon='list')\n+        map.connect('organization_bulk_process', '/organization/bulk_process/{org_id}', controller='organization', action='index')\n+        map.connect('organization_bulk_process_no_id', '/organization/bulk_process', controller='organization', action='index')\n         return map\n", "issue": "Org Admin:  Dataset management page is broken\nLog in as a sysadmin user.\nGo to:\nhttp://data.hdx.rwlabs.org/organization/bulk_process/ocha-fiss-geneva\n\n", "before_files": [{"content": "import logging\nimport ckan.plugins as plugins\nimport ckan.plugins.toolkit as tk\nimport ckan.lib.plugins as lib_plugins\n\nclass HDXOrgFormPlugin(plugins.SingletonPlugin, lib_plugins.DefaultOrganizationForm):\n    plugins.implements(plugins.IConfigurer, inherit=False)\n    plugins.implements(plugins.IRoutes, inherit=True)\n    plugins.implements(plugins.IGroupForm, inherit=False)\n    plugins.implements(plugins.ITemplateHelpers, inherit=False)\n\n    num_times_new_template_called = 0\n    num_times_read_template_called = 0\n    num_times_edit_template_called = 0\n    num_times_search_template_called = 0\n    num_times_history_template_called = 0\n    num_times_package_form_called = 0\n    num_times_check_data_dict_called = 0\n    num_times_setup_template_variables_called = 0\n\n    def update_config(self, config):\n        tk.add_template_directory(config, 'templates')\n\n    def get_helpers(self):\n        return {}\n\n    def is_fallback(self):\n        return False\n\n    def group_types(self):\n        return ['organization']\n\n    def _modify_group_schema(self, schema):\n        schema.update({\n                'description':[tk.get_validator('not_empty')],\n                'org_url':[tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')],\n                })\n        return schema\n\n    def form_to_db_schema(self):\n        schema = super(HDXOrgFormPlugin, self).form_to_db_schema()\n        schema = self._modify_group_schema(schema)\n        return schema\n        \n#     def check_data_dict(self, data_dict):\n#         return super(HDXOrgFormPlugin, self).check_data_dict(self, data_dict)\n    \n    def db_to_form_schema(self):\n        # There's a bug in dictionary validation when form isn't present\n        if tk.request.urlvars['action'] == 'index' or tk.request.urlvars['action'] == 'edit' or tk.request.urlvars['action'] == 'new':\n            schema = super(HDXOrgFormPlugin, self).form_to_db_schema()\n            schema.update({'description':[tk.get_validator('not_empty')] })\n            schema.update({'org_url':[tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')]})\n            return schema\n        else:\n            return None\n\n    def before_map(self, map):\n        map.connect('user_dashboard', '/dashboard', controller='ckanext.hdx_orgs.dashboard:DashboardController', action='dashboard',\n                  ckan_icon='list')\n        return map\n", "path": "ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py"}], "after_files": [{"content": "import logging\nimport ckan.plugins as plugins\nimport ckan.plugins.toolkit as tk\nimport ckan.lib.plugins as lib_plugins\n\nclass HDXOrgFormPlugin(plugins.SingletonPlugin, lib_plugins.DefaultOrganizationForm):\n    plugins.implements(plugins.IConfigurer, inherit=False)\n    plugins.implements(plugins.IRoutes, inherit=True)\n    plugins.implements(plugins.IGroupForm, inherit=False)\n    plugins.implements(plugins.ITemplateHelpers, inherit=False)\n\n    num_times_new_template_called = 0\n    num_times_read_template_called = 0\n    num_times_edit_template_called = 0\n    num_times_search_template_called = 0\n    num_times_history_template_called = 0\n    num_times_package_form_called = 0\n    num_times_check_data_dict_called = 0\n    num_times_setup_template_variables_called = 0\n\n    def update_config(self, config):\n        tk.add_template_directory(config, 'templates')\n\n    def get_helpers(self):\n        return {}\n\n    def is_fallback(self):\n        return False\n\n    def group_types(self):\n        return ['organization']\n\n    def _modify_group_schema(self, schema):\n        schema.update({\n                'description':[tk.get_validator('not_empty')],\n                'org_url':[tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')],\n                })\n        return schema\n\n    def form_to_db_schema(self):\n        schema = super(HDXOrgFormPlugin, self).form_to_db_schema()\n        schema = self._modify_group_schema(schema)\n        return schema\n        \n#     def check_data_dict(self, data_dict):\n#         return super(HDXOrgFormPlugin, self).check_data_dict(self, data_dict)\n    \n    def db_to_form_schema(self):\n        # There's a bug in dictionary validation when form isn't present\n        if tk.request.urlvars['action'] == 'index' or tk.request.urlvars['action'] == 'edit' or tk.request.urlvars['action'] == 'new':\n            schema = super(HDXOrgFormPlugin, self).form_to_db_schema()\n            schema.update({'description':[tk.get_validator('not_empty')] })\n            schema.update({'org_url':[tk.get_validator('not_missing'), tk.get_converter('convert_to_extras')]})\n            return schema\n        else:\n            return None\n\n    def before_map(self, map):\n        map.connect('user_dashboard', '/dashboard', controller='ckanext.hdx_orgs.dashboard:DashboardController', action='dashboard',\n                  ckan_icon='list')\n        map.connect('organization_bulk_process', '/organization/bulk_process/{org_id}', controller='organization', action='index')\n        map.connect('organization_bulk_process_no_id', '/organization/bulk_process', controller='organization', action='index')\n        return map\n", "path": "ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py"}]}