Skip to content

Commit

Permalink
fix stupid available credit compare (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
leduythuccs authored Oct 17, 2024
1 parent bbf8967 commit d8626d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/models/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d8626d1

Please sign in to comment.