mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Fixed unit tests
This commit is contained in:
@@ -113,6 +113,9 @@ SETTINGS_SAMPLE = {
|
||||
"imap_migration-enabled_imapmigration": True,
|
||||
"imap_migration-max_sync_accounts": 2,
|
||||
"imap_migration-create_folders": True,
|
||||
"postfix_autoreply-autoreplies_timeout": 86400,
|
||||
"postfix_autoreply-default_subject": "I'm off",
|
||||
"postfix_autoreply-default_content": "I'm off",
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -75,8 +75,13 @@ class AccountARMessageViewSet(viewsets.ViewSet):
|
||||
def armessage(self, request):
|
||||
if not hasattr(request.user, "mailbox"):
|
||||
return response.Response(status=404)
|
||||
params = dict(param_tools.get_global_parameters("postfix_autoreply"))
|
||||
armessage, created = models.ARmessage.objects.get_or_create(
|
||||
mbox=self.request.user.mailbox
|
||||
mbox=self.request.user.mailbox,
|
||||
defaults={
|
||||
"subject": params["default_subject"],
|
||||
"content": params["default_content"],
|
||||
},
|
||||
)
|
||||
if request.method == "GET":
|
||||
serializer = serializers.AccountARMessageSerializer(armessage)
|
||||
|
||||
Reference in New Issue
Block a user