FIX: use arrow timestamp not arrow directly (#2301)

This commit is contained in:
Adrià Casajús 2024-11-05 12:21:06 +01:00 committed by GitHub
parent 18a299f1d2
commit 9920ed0538
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -47,7 +47,7 @@ def lifetime_licence():
user=current_user,
content=EventContent(
user_plan_change=UserPlanChanged(
plan_end_time=arrow.get("2100-01-01")
plan_end_time=arrow.get("2100-01-01").timestamp
)
),
)

View file

@ -42,7 +42,7 @@ for batch_start in range(pu_id_start, max_pu_id, step):
if not partner_user.user.lifetime:
continue
with_lifetime += 1
event = UserPlanChanged(plan_end_time=arrow.get("2100-01-01"))
event = UserPlanChanged(plan_end_time=arrow.get("2100-01-01").timestamp)
EventDispatcher.send_event(
partner_user.user, EventContent(user_plan_change=event)
)

View file

@ -45,7 +45,7 @@ for batch_start in range(pu_id_start, max_pu_id, step):
end_timestamp = None
if partner_user.user.lifetime:
with_lifetime += 1
end_timestamp = arrow.get("2100-01-01")
end_timestamp = arrow.get("2100-01-01").timestamp
elif subscription_end:
with_premium += 1
end_timestamp = subscription_end.timestamp