Skip to content

Commit

Permalink
Merge pull request #370 from DNO-inc/refactoring
Browse files Browse the repository at this point in the history
fix bug in `_assemble_action` function
  • Loading branch information
m-o-d-e-r authored Jul 3, 2024
2 parents 348af93 + d4cf3f1 commit a79d981
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions burrito/utils/tickets_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,19 +491,19 @@ def _assemble_action(history_item: dict, ticket: Tickets, current_user_id: int)
old_value = old_assignee.login if old_assignee else history_item["old_value"]
new_value = new_assignee.login if new_assignee else history_item["new_value"]

return ActionSchema(
ticket_id=history_item["ticket_id"],
author=make_short_user_data(
history_item["user_id"],
hide_user_id=False if is_ticket_owner else (
ticket.anonymous and (history_item["user_id"] == ticket.creator.user_id)
)
),
creation_date=history_item["creation_date"],
field_name=history_item["field_name"],
old_value=old_value,
new_value=new_value
)
return ActionSchema(
ticket_id=history_item["ticket_id"],
author=make_short_user_data(
history_item["user_id"],
hide_user_id=False if is_ticket_owner else (
ticket.anonymous and (history_item["user_id"] == ticket.creator.user_id)
)
),
creation_date=history_item["creation_date"],
field_name=history_item["field_name"],
old_value=old_value,
new_value=new_value
)


def _assemble_comment(history_item: dict, ticket: Tickets, current_user_id: int) -> CommentDetailInfoScheme:
Expand Down

0 comments on commit a79d981

Please sign in to comment.