mirror of
https://github.com/Eugeny/tabby-web.git
synced 2025-06-08 05:29:52 +00:00
lint
This commit is contained in:
parent
69f45863f6
commit
e112b46063
@ -42,8 +42,7 @@ class AppVersionViewSet(ListModelMixin, GenericViewSet):
|
|||||||
plugins = [
|
plugins = [
|
||||||
os.path.basename(x["name"])
|
os.path.basename(x["name"])
|
||||||
for x in fs.listdir(dir)
|
for x in fs.listdir(dir)
|
||||||
if x["type"] == "directory"
|
if x["type"] == "directory" and os.path.basename(x["name"])
|
||||||
and os.path.basename(x["name"])
|
|
||||||
not in [
|
not in [
|
||||||
"tabby-web-container",
|
"tabby-web-container",
|
||||||
"tabby-web-demo",
|
"tabby-web-demo",
|
||||||
|
@ -33,9 +33,7 @@ class UserSerializer(ModelSerializer):
|
|||||||
|
|
||||||
def get_is_pro(self, obj):
|
def get_is_pro(self, obj):
|
||||||
return (
|
return (
|
||||||
obj.force_pro
|
obj.force_pro or not settings.GITHUB_ELIGIBLE_SPONSORSHIPS or check_is_sponsor_cached(obj)
|
||||||
or not settings.GITHUB_ELIGIBLE_SPONSORSHIPS
|
|
||||||
or check_is_sponsor_cached(obj)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def get_is_sponsor(self, obj):
|
def get_is_sponsor(self, obj):
|
||||||
|
@ -73,8 +73,7 @@ def check_is_sponsor(user: User) -> bool:
|
|||||||
):
|
):
|
||||||
continue
|
continue
|
||||||
if (
|
if (
|
||||||
info["totalRecurringMonthlyPriceInDollars"]
|
info["totalRecurringMonthlyPriceInDollars"] >= settings.GITHUB_SPONSORS_MIN_PAYMENT
|
||||||
>= settings.GITHUB_SPONSORS_MIN_PAYMENT
|
|
||||||
):
|
):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user