Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalEgn committed Dec 6, 2023
1 parent ce9c6f6 commit 3f3e342
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions inspirehep/modules/workflows/tasks/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def reply_snow_ticket(obj, ticket_id, context_factory, user, template=None):
if template:
template_context = context_factory(user, obj)
template = _get_ticket_template_name(template)
data=json.dumps(
data = json.dumps(
{
"ticket_id": str(ticket_id),
"template": template,
Expand All @@ -168,7 +168,7 @@ def reply_snow_ticket(obj, ticket_id, context_factory, user, template=None):
)
else:
reply_message = obj.extra_data.get("reason", "")
data=json.dumps(
data = json.dumps(
{
"ticket_id": str(ticket_id),
"reply_message": reply_message,
Expand All @@ -185,6 +185,7 @@ def reply_snow_ticket(obj, ticket_id, context_factory, user, template=None):
)
response.raise_for_status()


def reply_ticket(template=None, context_factory=None, keep_new=False):
"""Reply to a ticket for the submission."""

Expand Down Expand Up @@ -248,12 +249,12 @@ def close_snow_ticket(obj, ticket_id, context_factory, user, template=None):
if template:
template_context = context_factory(user, obj)
template = _get_ticket_template_name(template)
data=json.dumps({"ticket_id": str(ticket_id),
"template": template,
"template_context": template_context})
data = json.dumps({"ticket_id": str(ticket_id),
"template": template,
"template_context": template_context})
else:
data=json.dumps({"ticket_id": str(ticket_id)})
data = json.dumps({"ticket_id": str(ticket_id)})

response = requests.post(
"{inspirehep_url}/tickets/resolve".format(
inspirehep_url=current_app.config["INSPIREHEP_URL"]
Expand Down

0 comments on commit 3f3e342

Please sign in to comment.