Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
Fix various errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed Feb 9, 2016
1 parent a11c4f0 commit 36f9701
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions sentry_jira/forms.py
Expand Up @@ -214,8 +214,8 @@ def __init__(self, *args, **kwargs):
if len(meta["projects"]) is 0:
super(JIRAIssueForm, self).__init__(*args, **kwargs)
self.errors["__all__"] = [
"Error in JIRA configuration, no projects found for user %s." %
jira_client.username]
"Error in JIRA configuration, no projects found for user %s.".format(jira_client.username)
]
return

# Looking up the project meta by exact key, so it's always the first
Expand Down
8 changes: 4 additions & 4 deletions sentry_jira/plugin.py
Expand Up @@ -3,6 +3,7 @@
import urlparse

from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from sentry.models import GroupMeta, Event
from sentry.plugins.base import JSONResponse
Expand Down Expand Up @@ -172,13 +173,12 @@ def view(self, request, group, **kwargs):
initial=self.get_initial_form_data(request, group, event),
jira_client=self.get_jira_client(group.project),
project_key=self.get_option('default_project', group.project),
ignored_fields=self.get_option("ignored_fields", group.project))
#######################################################################
ignored_fields=self.get_option("ignored_fields", group.project)
)

# to allow the form to be submitted, but ignored so that dynamic fields
# can change if the issuetype is different
#
if request.POST and request.POST.get("changing_issuetype") == "0":
#######################################################################
if form.is_valid():
issue_id, error = self.create_issue(
group=group,
Expand Down
3 changes: 1 addition & 2 deletions tests/sentry_jira/test_plugin.py
Expand Up @@ -4,7 +4,6 @@

from django.http import HttpRequest
from exam import fixture
from sentry.models import GroupMeta
from sentry.testutils import TestCase

from sentry_jira.plugin import JIRAPlugin
Expand All @@ -28,7 +27,7 @@ def test_create_issue(self):

request = HttpRequest()
group = self.create_group(message='Hello world', culprit='foo.bar')
event = self.create_event(group=group, message='Hello world')
self.create_event(group=group, message='Hello world')

form_data = {

Expand Down

0 comments on commit 36f9701

Please sign in to comment.