This commit is contained in:
Eugene Pankov 2022-12-26 18:49:25 +01:00
parent 69f45863f6
commit e112b46063
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
3 changed files with 3 additions and 7 deletions

View File

@ -42,8 +42,7 @@ class AppVersionViewSet(ListModelMixin, GenericViewSet):
plugins = [
os.path.basename(x["name"])
for x in fs.listdir(dir)
if x["type"] == "directory"
and os.path.basename(x["name"])
if x["type"] == "directory" and os.path.basename(x["name"])
not in [
"tabby-web-container",
"tabby-web-demo",

View File

@ -33,9 +33,7 @@ class UserSerializer(ModelSerializer):
def get_is_pro(self, obj):
return (
obj.force_pro
or not settings.GITHUB_ELIGIBLE_SPONSORSHIPS
or check_is_sponsor_cached(obj)
obj.force_pro or not settings.GITHUB_ELIGIBLE_SPONSORSHIPS or check_is_sponsor_cached(obj)
)
def get_is_sponsor(self, obj):

View File

@ -73,8 +73,7 @@ def check_is_sponsor(user: User) -> bool:
):
continue
if (
info["totalRecurringMonthlyPriceInDollars"]
>= settings.GITHUB_SPONSORS_MIN_PAYMENT
info["totalRecurringMonthlyPriceInDollars"] >= settings.GITHUB_SPONSORS_MIN_PAYMENT
):
return True