diff --git a/judge/models/profile.py b/judge/models/profile.py index 4c76a098d..3336bfa3d 100644 --- a/judge/models/profile.py +++ b/judge/models/profile.py @@ -114,7 +114,7 @@ def get_users_url(self): return reverse('organization_users', args=[self.slug]) def has_credit_left(self): - return self.current_consumed_credit < self.available_credit + self.monthly_credit + return self.available_credit + self.monthly_credit > 0 def consume_credit(self, consumed): # reduce credit in monthly credit first