Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DjangoCRM committed Sep 9, 2024
1 parent b3f59cd commit cabd796
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crm/site/dealadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,14 +404,14 @@ def save_model(self, request, obj, form, change):
)
if 'next_step' in form.changed_data:
if request.user != obj.owner:
next_step = obj.next_step + f' ({request.user})'
next_step = obj.next_step + f' ({request.user.username})'
next_step_len = len(next_step)
delta = next_step_len - 250
if delta > 0:
obj.next_step = truncatechars(
obj.next_step, len(obj.next_step) - delta
)
obj.next_step += f' ({request.user})'
obj.next_step += f' ({request.user.username})'
obj.add_to_workflow(obj.next_step)
if 'closing_reason' in form.changed_data:
obj.active = not bool(obj.closing_reason)
Expand Down

0 comments on commit cabd796

Please sign in to comment.