-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Invalid Project Webhook Notification doesn't vanish if the project is deleted. #4854
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
Comments
@humitos It can be edited in following manner: @login_required
def project_delete(request, project_slug):
"""
Project delete confirmation view.
Make a project as deleted on POST, otherwise show a form asking for
confirmation of delete.
"""
project = get_object_or_404(
Project.objects.for_admin_user(request.user), slug=project_slug)
if request.method == 'POST':
broadcast(type='app', task=tasks.remove_dir, args=[project.doc_path])
project_str = str(project)
project.delete()
messages.success(request, _('Project deleted'))
msgs_queryset = Message.objects.filter(message__contains=project_str)
if msgs_queryset.exists():
msgs_queryset.update(read=True)
project_dashboard = reverse('projects_dashboard')
return HttpResponseRedirect(project_dashboard)
return render(request, 'projects/project_delete.html', {'project': project}) |
This is the case of #4684, I wonder if we should just put all these cases on the other issue. We need to solve this in a generic way. |
I'm closing this in favor of #4684. I added an explanation there on why this is happening. @dojutsu-user please, if you want to propose a change into the code, open a PR which is easier to see the differences and follow your changes. Thanks for your collaboration! |
@humitos |
Steps To Reproduce
While importing a project manually,
Repository URL: https://github.com/dojutsu-user/template.git (Making sure that the webhook set up is invalid)
During the building of the project (or after the build, it doesn't matter), in a new tab, open the same project settings and delete it.
When clicked on
the project integration
link, it takes to a 404 page and then the notification gets marked as read and then vanish.The notification is persistent and doesn't go unless and until the link is clicked.
Expected Result
It should gets vanished immediately after the project is deleted and should not wait for the clicking on the link
the project integration
.The text was updated successfully, but these errors were encountered: