okfn / ckanext-lacounts

CKAN extension for the LA Counts project
GNU Affero General Public License v3.0
8 stars 5 forks source link

Improve tagging system safety and code quality #185

Closed roll closed 5 years ago

roll commented 5 years ago
roll commented 5 years ago
 TypeError: 'NoneType' object has no attribute '__getitem__'
View as:   Interactive (full)  |  Text (full)  |  XML (full)
Module ckan.controllers.package:780 in edit          view
>>  return self._save_edit(id, context, package_type=package_type)
Module ckan.controllers.package:1003 in _save_edit          view
>>  self._form_save_redirect(pkg['name'], 'edit',
TypeError: 'NoneType' object has no attribute '__getitem__'
roll commented 5 years ago

@amercader So a quick summary:

  1. I moved groups_override calculation to the client (js) which is much safer
  2. On form submission I have proper groups_override in form of serialized json
  3. I just want to recalculate groups based on terms/groups_override on actions.package_update but it fails (see above)
amercader commented 5 years ago

@roll please have a look Also I can not reproduce #177 in this PR, I guess because of the ast.literal_eval() call?