♻️(backend) refacto email invitation
Remove email invitation from Invitation model to be able to use it in other context. We add it in utils.py instead, and it will be called from the viewset. We add the document_id to link to the document from the mail.
This commit is contained in:
@@ -262,7 +262,6 @@ class InvitationSerializer(serializers.ModelSerializer):
|
||||
"Only owners of a document can invite other users as owners."
|
||||
)
|
||||
|
||||
user.language = request.headers.get("Content-Language", "en")
|
||||
attrs["document_id"] = document_id
|
||||
attrs["issuer"] = user
|
||||
return attrs
|
||||
|
||||
Reference in New Issue
Block a user