Skip to content

Commit f367acb

Browse files
authored
Add next bill date on admin UI (simple-login#1154)
* add subscription next bill date on admin * small refactor: remove unused param
1 parent b742f58 commit f367acb

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

app/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,11 +690,11 @@ def upgrade_channel(self) -> str:
690690
if sub:
691691
if sub.cancelled:
692692
channels.append(
693-
f"Cancelled Paddle Subscription {sub.subscription_id} {sub.plan_name()}"
693+
f"Cancelled Paddle Subscription {sub.subscription_id} {sub.plan_name()} {sub.next_bill_date}"
694694
)
695695
else:
696696
channels.append(
697-
f"Active Paddle Subscription {sub.subscription_id} {sub.plan_name()}"
697+
f"Active Paddle Subscription {sub.subscription_id} {sub.plan_name()} {sub.next_bill_date}"
698698
)
699699

700700
apple_sub: AppleSubscription = AppleSubscription.get_by(user_id=self.id)

email_handler.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@
168168
from server import create_light_app
169169

170170

171-
def get_or_create_contact(
172-
from_header: str, mail_from: str, alias: Alias, msg: Message
173-
) -> Contact:
171+
def get_or_create_contact(from_header: str, mail_from: str, alias: Alias) -> Contact:
174172
"""
175173
contact_from_header is the RFC 2047 format FROM header
176174
"""
@@ -626,7 +624,7 @@ def handle_forward(envelope, msg: Message, rcpt_to: str) -> List[Tuple[bool, str
626624
from_header = get_header_unicode(msg[headers.FROM])
627625
LOG.d("Create or get contact for from_header:%s", from_header)
628626
try:
629-
contact = get_or_create_contact(from_header, envelope.mail_from, alias, msg)
627+
contact = get_or_create_contact(from_header, envelope.mail_from, alias)
630628
except ObjectDeletedError:
631629
LOG.d("maybe alias was deleted in the meantime")
632630
alias = Alias.get_by(email=alias_address)

0 commit comments

Comments
 (0)