chore: unarchived issue and date format changes (#2598)

* chore: unarchived issue message corrected

* chore: passing the date in archived at
This commit is contained in:
Bavisetti Narayan 2023-11-01 20:11:40 +05:30 committed by GitHub
parent 8c620c4f96
commit 4f09a89f5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1086,8 +1086,6 @@ class IssueArchiveViewSet(BaseViewSet):
archived_at__isnull=False, archived_at__isnull=False,
pk=pk, pk=pk,
) )
issue.archived_at = None
issue.save()
issue_activity.delay( issue_activity.delay(
type="issue.activity.updated", type="issue.activity.updated",
requested_data=json.dumps({"archived_at": None}), requested_data=json.dumps({"archived_at": None}),
@ -1099,6 +1097,8 @@ class IssueArchiveViewSet(BaseViewSet):
), ),
epoch=int(timezone.now().timestamp()), epoch=int(timezone.now().timestamp()),
) )
issue.archived_at = None
issue.save()
return Response(IssueSerializer(issue).data, status=status.HTTP_200_OK) return Response(IssueSerializer(issue).data, status=status.HTTP_200_OK)

View File

@ -59,7 +59,7 @@ def archive_old_issues():
# Check if Issues # Check if Issues
if issues: if issues:
# Set the archive time to current time # Set the archive time to current time
archive_at = timezone.now() archive_at = timezone.now().date()
issues_to_update = [] issues_to_update = []
for issue in issues: for issue in issues: