Mbonea commited on
Commit
dfa6f47
·
1 Parent(s): 7754df5

timezone comparison

Browse files
Files changed (1) hide show
  1. App/Plans/Model.py +1 -1
App/Plans/Model.py CHANGED
@@ -43,7 +43,7 @@ class Plan(Model):
43
  async def is_promo_valid(self) -> bool:
44
  """Check if the promotional plan is still valid."""
45
  if self.is_promo and self.expire_date:
46
- return datetime.now() < self.expire_date
47
  self.is_valid = False
48
  await self.save()
49
  return False
 
43
  async def is_promo_valid(self) -> bool:
44
  """Check if the promotional plan is still valid."""
45
  if self.is_promo and self.expire_date:
46
+ return datetime.now() < self.expire_date.replace(tzinfo=None)
47
  self.is_valid = False
48
  await self.save()
49
  return False