mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: uuid error when cycle and module updates (#1585)
This commit is contained in:
parent
34123681cf
commit
5e625ab132
@ -1028,7 +1028,12 @@ def issue_activity(
|
|||||||
actor = User.objects.get(pk=actor_id)
|
actor = User.objects.get(pk=actor_id)
|
||||||
project = Project.objects.get(pk=project_id)
|
project = Project.objects.get(pk=project_id)
|
||||||
|
|
||||||
|
if type not in [
|
||||||
|
"cycle.activity.created",
|
||||||
|
"cycle.activity.deleted",
|
||||||
|
"module.activity.created",
|
||||||
|
"module.activity.deleted",
|
||||||
|
]:
|
||||||
issue = Issue.objects.filter(pk=issue_id, project_id=project_id).first()
|
issue = Issue.objects.filter(pk=issue_id, project_id=project_id).first()
|
||||||
|
|
||||||
if issue is not None:
|
if issue is not None:
|
||||||
@ -1094,6 +1099,12 @@ def issue_activity(
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
capture_exception(e)
|
capture_exception(e)
|
||||||
|
|
||||||
|
if type not in [
|
||||||
|
"cycle.activity.created",
|
||||||
|
"cycle.activity.deleted",
|
||||||
|
"module.activity.created",
|
||||||
|
"module.activity.deleted",
|
||||||
|
]:
|
||||||
# Create Notifications
|
# Create Notifications
|
||||||
bulk_notifications = []
|
bulk_notifications = []
|
||||||
|
|
||||||
@ -1114,7 +1125,11 @@ def issue_activity(
|
|||||||
issue = Issue.objects.filter(pk=issue_id, project_id=project_id).first()
|
issue = Issue.objects.filter(pk=issue_id, project_id=project_id).first()
|
||||||
|
|
||||||
# Add bot filtering
|
# Add bot filtering
|
||||||
if issue is not None and issue.created_by_id is not None and not issue.created_by.is_bot:
|
if (
|
||||||
|
issue is not None
|
||||||
|
and issue.created_by_id is not None
|
||||||
|
and not issue.created_by.is_bot
|
||||||
|
):
|
||||||
issue_subscribers = issue_subscribers + [issue.created_by_id]
|
issue_subscribers = issue_subscribers + [issue.created_by_id]
|
||||||
|
|
||||||
for subscriber in issue_subscribers:
|
for subscriber in issue_subscribers:
|
||||||
@ -1146,7 +1161,9 @@ def issue_activity(
|
|||||||
"new_value": str(issue_activity.new_value),
|
"new_value": str(issue_activity.new_value),
|
||||||
"old_value": str(issue_activity.old_value),
|
"old_value": str(issue_activity.old_value),
|
||||||
"issue_comment": str(
|
"issue_comment": str(
|
||||||
issue_activity.issue_comment.comment_stripped if issue_activity.issue_comment is not None else ""
|
issue_activity.issue_comment.comment_stripped
|
||||||
|
if issue_activity.issue_comment is not None
|
||||||
|
else ""
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user