remove can_receive

This commit is contained in:
Finn Stutzenstein committed 2022-03-06 11:14:19 +01:00
1 parent 8f623a264d
commit 818a43202a
14 files changed
+19 -112

No files matched your search

+2 -11
View File
@@ -38,15 +38,6 @@ class AliasCreate(
flash(t("Enabled is not set"), category="error")
error = True
can_receive = self.request.form.get("can_receive")
if can_receive == "on":
self.can_receive = True
elif can_receive is None:
self.can_receive = False
else:
flash(t("Can receive is not set"), category="error")
error = True
note = self.request.form.get("note", "")
if not isinstance(note, str):
flash(t("Note must be a string"), category="error")
@@ -59,7 +50,7 @@ class AliasCreate(
try:
create_alias(
self.email, self.user, self.enabled, self.can_receive, self.note
self.email, self.user, self.enabled, self.note
)
except EmailAlreadyExists as e:
if self.auth_user.is_admin:
@@ -79,7 +70,7 @@ class AliasCreate(
def get_context(self):
context = super().get_context()
for key in ("email", "enabled", "can_receive", "note"):
for key in ("email", "enabled", "note"):
if hasattr(self, key):
context[key] = getattr(self, key)
return context