Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Fixed NotificationReadAllView #216

Merged
merged 2 commits into from
Jan 13, 2022
Merged

[fix] Fixed NotificationReadAllView #216

merged 2 commits into from
Jan 13, 2022

Conversation

pandafy
Copy link
Member

@pandafy pandafy commented Jan 11, 2022

  • Fixed browsable API view for NotificationReadAllView
  • Moved updating database query to celery worker

@pandafy pandafy force-pushed the fixed-read-all-view branch 2 times, most recently from b3d9c7e to 0124909 Compare January 11, 2022 19:07

@shared_task(soft_time_limit=600, time_limit=1800)
def flag_user_notifications_as_read(user_id):
Notification.objects.filter(recipient_id=user_id).update(unread=False)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's filter by unread here

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try bringing it back to the foreground but keep the improved query (that is, filter by unread).

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@nemesifier nemesifier merged commit f945ccc into master Jan 13, 2022
@nemesifier nemesifier deleted the fixed-read-all-view branch January 13, 2022 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants