mirror of
https://github.com/simple-login/app.git
synced 2025-10-10 07:16:56 +08:00
reformat
This commit is contained in:
parent
47f8e6f8e8
commit
ed76a8ae8d
2 changed files with 6 additions and 4 deletions
|
@ -252,14 +252,15 @@ class User(db.Model, ModelMixin, UserMixin):
|
||||||
|
|
||||||
manual_sub: ManualSubscription = ManualSubscription.get_by(user_id=self.id)
|
manual_sub: ManualSubscription = ManualSubscription.get_by(user_id=self.id)
|
||||||
# user who has giveaway premium can decide to upgrade
|
# user who has giveaway premium can decide to upgrade
|
||||||
if manual_sub and manual_sub.end_at > arrow.now() and not manual_sub.is_giveaway:
|
if (
|
||||||
|
manual_sub
|
||||||
|
and manual_sub.end_at > arrow.now()
|
||||||
|
and not manual_sub.is_giveaway
|
||||||
|
):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def next_bill_date(self) -> str:
|
def next_bill_date(self) -> str:
|
||||||
sub: Subscription = self.get_subscription()
|
sub: Subscription = self.get_subscription()
|
||||||
if sub:
|
if sub:
|
||||||
|
|
|
@ -86,6 +86,7 @@ from server import create_app
|
||||||
# can happen when user "Reply All" on some email clients
|
# can happen when user "Reply All" on some email clients
|
||||||
_SELF_FORWARDING_STATUS = "550 SL self-forward"
|
_SELF_FORWARDING_STATUS = "550 SL self-forward"
|
||||||
|
|
||||||
|
|
||||||
# fix the database connection leak issue
|
# fix the database connection leak issue
|
||||||
# use this method instead of create_app
|
# use this method instead of create_app
|
||||||
def new_app():
|
def new_app():
|
||||||
|
|
Loading…
Add table
Reference in a new issue