prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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
  
  
  </issue>
  <code>
  [start of ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py]
  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 of ckanext-hdx_orgs/ckanext/hdx_orgs/plugin.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
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"}]}