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

Append a UUID to our contact email's subject line #3404

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions perma_web/perma/views/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from io import StringIO
from link_header import Link as Rel, LinkHeader
from urllib.parse import urlencode
import uuid
from timegate.utils import closest
from warcio.timeutils import datetime_to_http_date
from werkzeug.http import parse_date
Expand Down Expand Up @@ -393,7 +394,7 @@ def handle_registrar_fields(form):
if form.is_valid():
# Assemble info for email
from_address = form.cleaned_data['email']
subject = "[perma-contact] " + form.cleaned_data['subject']
subject = f"[perma-contact] {form.cleaned_data['subject']} ({str(uuid.uuid4())})"
context = {
"message": form.cleaned_data['box2'],
"from_address": from_address,
Expand Down Expand Up @@ -499,7 +500,7 @@ def affiliation_string():
if form.is_valid():
if form.cleaned_data['guid']:
from_address = form.cleaned_data['email']
subject = "[perma-contact] Reporting Inappropriate Content"
subject = f"[perma-contact] Reporting Inappropriate Content ({str(uuid.uuid4())})"
context = {
"reason": form.cleaned_data['reason'],
"source": form.cleaned_data['source'],
Expand Down
Loading