Skip to content

Commit

Permalink
Fix user_already_buy method logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Dec 27, 2023
1 parent 1ba349c commit c4d6b53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/sspanel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def user_can_buy(self, user: User):

def user_already_buy(self, user: User):
return (
user.level == self.level and user.level_expire_time > get_current_datetime()
user.level >= self.level and user.level_expire_time > get_current_datetime()
)

@transaction.atomic
Expand Down

0 comments on commit c4d6b53

Please sign in to comment.