timezone comparison
Browse files- 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
|