feat: added created_at field to be writable and added those changes to (#5142)

the activity
This commit is contained in:
M. Palanikannan 2024-07-23 20:50:51 +05:30 committed by GitHub
parent 78481d45d4
commit a8b2bcc838
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 22 additions and 13 deletions

View file

@ -309,6 +309,11 @@ class IssueAPIEndpoint(BaseAPIView):
)
serializer.save()
# Refetch the issue
issue = Issue.objects.filter(workspace__slug=slug, project_id=project_id, pk=serializer.data["id"]).first()
issue.created_at = request.data.get("created_at")
issue.save(update_fields=["created_at"])
# Track the issue
issue_activity.delay(