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 = [ 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",

View File

@ -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):

View File

@ -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