fix: Correct push notification label error (#2411)

* fix: push notification label error

* chore: updated string comparision
This commit is contained in:
guru_sainath
2025-02-06 15:53:29 +05:30
committed by GitHub
parent 74ab593d2b
commit 7560378da3

View File

@@ -322,7 +322,7 @@ def issue_push_notifications(notification):
body = (
f"{actor_name} "
f"{'added a new' if new_value else 'removed the'} "
f"{'assignee' if property_key == 'assignees' else "label"} "
f"{'assignee' if property_key == 'assignees' else 'label'} "
f"{new_value if new_value else old_value}"
)
# start_date and target_date
@@ -385,7 +385,7 @@ def issue_push_notifications(notification):
comment_data = comment_content(content) if content else None
body = (
f"{actor_name} "
f"{'removed the comment' if new_value == "None" and old_value == "None" else 'updated the comment' if old_value != "None" else 'commented'} "
f"{'removed the comment' if new_value == 'None' and old_value == 'None' else 'updated the comment' if old_value != 'None' else 'commented'} "
f"{comment_data['content'] if comment_data else ''}"
)