mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Mail: Fix fetching of customers
This commit is contained in:
@@ -352,9 +352,6 @@ def mail_send_task(self, *args, to: List[str], subject: str, body: str, html: st
|
|||||||
if user:
|
if user:
|
||||||
user = User.objects.get(pk=user)
|
user = User.objects.get(pk=user)
|
||||||
|
|
||||||
if customer:
|
|
||||||
customer = Customer.objects.get(pk=customer)
|
|
||||||
|
|
||||||
if event:
|
if event:
|
||||||
with scopes_disabled():
|
with scopes_disabled():
|
||||||
event = Event.objects.get(id=event)
|
event = Event.objects.get(id=event)
|
||||||
@@ -369,9 +366,11 @@ def mail_send_task(self, *args, to: List[str], subject: str, body: str, html: st
|
|||||||
backend = get_connection(fail_silently=False)
|
backend = get_connection(fail_silently=False)
|
||||||
cm = lambda: scopes_disabled() # noqa
|
cm = lambda: scopes_disabled() # noqa
|
||||||
|
|
||||||
log_target = user or customer
|
|
||||||
|
|
||||||
with cm():
|
with cm():
|
||||||
|
if customer:
|
||||||
|
customer = Customer.objects.get(pk=customer)
|
||||||
|
log_target = user or customer
|
||||||
|
|
||||||
if event:
|
if event:
|
||||||
if order:
|
if order:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user