mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-13 13:12:42 +00:00
Don't send link to edit deleted submissions
Once a submission, like a news article, has been deleted, that link would just become a 404 anyway.
This commit is contained in:
@ -322,7 +322,9 @@ def _send_moderation_message(request, obj, message, notice, what):
|
||||
if notice:
|
||||
admmsg += "\n\nModeration notice:\n{}".format(notice)
|
||||
|
||||
admmsg += "\n\nEdit at: {}/admin/_moderate/{}/{}/\n".format(settings.SITE_ROOT, obj._meta.model_name, obj.id)
|
||||
if what != "rejected":
|
||||
# No point in sending an edit link to a page that doesn't exist anymore
|
||||
admmsg += "\n\nEdit at: {}/admin/_moderate/{}/{}/\n".format(settings.SITE_ROOT, obj._meta.model_name, obj.id)
|
||||
|
||||
if obj.twomoderators:
|
||||
modname = "{} and {}".format(obj.firstmoderator, request.user)
|
||||
|
Reference in New Issue
Block a user