Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit af8eaf9

Browse files
committed
update with suggestions
1 parent b1d0613 commit af8eaf9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

codecov_auth/admin.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,19 +766,19 @@ class Meta:
766766
model = Plan
767767
fields = "__all__"
768768

769-
def clean_base_unit_price(self):
769+
def clean_base_unit_price(self) -> int | None:
770770
base_unit_price = self.cleaned_data.get("base_unit_price")
771771
if base_unit_price is not None and base_unit_price < 0:
772772
raise forms.ValidationError("Base unit price cannot be negative.")
773773
return base_unit_price
774774

775-
def clean_max_seats(self):
775+
def clean_max_seats(self) -> int | None:
776776
max_seats = self.cleaned_data.get("max_seats")
777777
if max_seats is not None and max_seats < 0:
778778
raise forms.ValidationError("Max seats cannot be negative.")
779779
return max_seats
780780

781-
def clean_monthly_uploads_limit(self):
781+
def clean_monthly_uploads_limit(self) -> int | None:
782782
monthly_uploads_limit = self.cleaned_data.get("monthly_uploads_limit")
783783
if monthly_uploads_limit is not None and monthly_uploads_limit < 0:
784784
raise forms.ValidationError("Monthly uploads limit cannot be negative.")
@@ -794,8 +794,11 @@ class PlanAdmin(admin.ModelAdmin):
794794
"base_unit_price",
795795
"is_active",
796796
"paid_plan",
797+
"max_seats",
798+
"monthly_uploads_limit",
799+
"billing_rate",
797800
)
798-
list_filter = ("is_active", "paid_plan", "billing_rate")
801+
list_filter = ("is_active", "paid_plan", "billing_rate", "tier")
799802
search_fields = ("name__iregex", "marketing_name__iregex")
800803
fields = [
801804
"tier",

0 commit comments

Comments
 (0)