getsentry / sentry-jira

A Plugin for sentry that lets you create JIRA issues
Other
95 stars 32 forks source link

TypeError: 'NoneType' object has no attribute '__getitem__' #18

Closed dcramer closed 12 years ago

dcramer commented 12 years ago
TypeError: 'NoneType' object has no attribute '__getitem__'

Stacktrace (most recent call last):

  File "django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "sentry/web/decorators.py", line 154, in wrapped
    return func(request, *args, **kwargs)
  File "sentry/web/decorators.py", line 77, in _wrapped
    return func(request, project, *args, **kwargs)
  File "sentry/web/frontend/groups.py", line 340, in group_plugin_action
    response = plugin.get_view_response(request, group)
  File "sentry/plugins/base.py", line 309, in get_view_response
    response = self.view(request, group)
  File "sentry_jira/plugin.py", line 98, in view
    ignored_fields=self.get_option("ignored_fields", group.project))
  File "sentry_jira/forms.py", line 123, in __init__
    project = meta["projects"][0]
thurloat commented 12 years ago

Looks like it's because I'm naively using JSON responses without checking statuses or whether the JSON exists.

msaffitz commented 12 years ago

Thanks, this is working now, but it's a bit clunky still-- I can update values, and those values take (as indicated by the success message), but even with valid values I'm not immediately presented with the options to choose a project, etc. I had to navigate away and wait for a bit for those to appear.

thurloat commented 12 years ago

@msaffitz I think that may be eager caching, I'll disable it for now until we get this sorted out.