From 1c98ea48e6ae10cb3e33ab83443d1984ccf334db Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Sun, 3 Mar 2019 13:04:50 +0100
Subject: [PATCH] Merge mgirations

---
 organizations/views.py                           | 14 +++++++-------
 .../migrations/0053_merge_20190303_1304.py       | 16 ++++++++++++++++
 2 files changed, 23 insertions(+), 7 deletions(-)
 create mode 100644 submissions/migrations/0053_merge_20190303_1304.py

diff --git a/organizations/views.py b/organizations/views.py
index df80d6f32..502cdfd4d 100644
--- a/organizations/views.py
+++ b/organizations/views.py
@@ -24,7 +24,7 @@ from .models import Organization, OrganizationEvent, ContactPerson, Contact, Con
 
 from funders.models import Funder
 from mails.utils import DirectMailUtil
-from mails.views import MailEditingSubView
+from mails.views import MailEditorSubview
 from organizations.decorators import has_contact
 
 from scipost.mixins import PermissionsMixin, PaginationMixin
@@ -219,7 +219,7 @@ def email_contactperson(request, contactperson_id, mail=None):
     else:
         code = 'org_contacts/contactperson_initial_mail'
         suffix = ' (initial)'
-    mail_request = MailEditingSubView(request, mail_code=code, contactperson=contactperson)
+    mail_request = MailEditorSubview(request, code, contactperson=contactperson)
     if mail_request.is_valid():
         comments = 'Email{suffix} sent to ContactPerson {name}.'.format(
             suffix=suffix, name=contactperson)
@@ -231,10 +231,10 @@ def email_contactperson(request, contactperson_id, mail=None):
             noted_by=request.user)
         event.save()
         messages.success(request, 'Email successfully sent.')
-        mail_request.send()
+        mail_request.send_mail()
         return redirect(contactperson.organization.get_absolute_url())
     else:
-        return mail_request.return_render()
+        return mail_request.interrupt()
 
 
 @permission_required('scipost.can_manage_organizations', return_403=True)
@@ -379,7 +379,7 @@ def email_contactrole(request, contactrole_id, mail=None):
     else:
         code = 'org_contacts/contactrole_generic_mail'
         suffix = ' (generic)'
-    mail_request = MailEditingSubView(request, mail_code=code, contactrole=contactrole)
+    mail_request = MailEditorSubview(request, mail_code=code, contactrole=contactrole)
     if mail_request.is_valid():
         comments = 'Email{suffix} sent to Contact {name}.'.format(
             suffix=suffix, name=contactrole.contact)
@@ -391,7 +391,7 @@ def email_contactrole(request, contactrole_id, mail=None):
             noted_by=request.user)
         event.save()
         messages.success(request, 'Email successfully sent.')
-        mail_request.send()
+        mail_request.send_mail()
         return redirect(contactrole.organization.get_absolute_url())
     else:
-        return mail_request.return_render()
+        return mail_request.interrupt()
diff --git a/submissions/migrations/0053_merge_20190303_1304.py b/submissions/migrations/0053_merge_20190303_1304.py
new file mode 100644
index 000000000..cde7f1c68
--- /dev/null
+++ b/submissions/migrations/0053_merge_20190303_1304.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.4 on 2019-03-03 12:04
+from __future__ import unicode_literals
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('submissions', '0052_merge_20190303_1241'),
+        ('submissions', '0052_merge_20190209_1124'),
+    ]
+
+    operations = [
+    ]
-- 
GitLab