Skip to content

Commit

Permalink
move ATTRIBUTES_TO_SAVE_FOR_INBOUND to constants
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Nov 28, 2023
1 parent 5eecd6d commit c20e04d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 0 additions & 3 deletions lemarche/api/emails/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@ class EmailItemSerializer(serializers.Serializer):
Headers = serializers.DictField()


ATTRIBUTES_TO_SAVE_FOR_INBOUND = ["From", "To", "CC", "ReplyTo", "SentAtDate", "Attachments"]


class EmailsSerializer(serializers.Serializer):
items = serializers.ListField(child=EmailItemSerializer())
3 changes: 2 additions & 1 deletion lemarche/api/emails/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from rest_framework.response import Response
from rest_framework.views import APIView

from lemarche.api.emails.serializers import ATTRIBUTES_TO_SAVE_FOR_INBOUND, EmailsSerializer
from lemarche.api.emails.serializers import EmailsSerializer
from lemarche.conversations.constants import ATTRIBUTES_TO_SAVE_FOR_INBOUND
from lemarche.conversations.models import Conversation
from lemarche.conversations.utils import get_info_from_email_prefix
from lemarche.www.conversations.tasks import send_email_from_conversation
Expand Down
1 change: 1 addition & 0 deletions lemarche/conversations/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ATTRIBUTES_TO_SAVE_FOR_INBOUND = ["From", "To", "CC", "ReplyTo", "SentAtDate", "Attachments"]

0 comments on commit c20e04d

Please sign in to comment.