python: Prevent bare timedelta(), which defaults to days.

This commit is contained in:
Alex Vandiver
2023-11-28 18:33:10 +00:00
committed by Tim Abbott
parent 0f132cef4d
commit 82c08dd153
3 changed files with 24 additions and 6 deletions

View File

@@ -1709,7 +1709,7 @@ Output:
def set_age(user_name: str, age: int) -> None:
user = self.example_user(user_name)
user.date_joined = timezone_now() - timedelta(age)
user.date_joined = timezone_now() - timedelta(days=age)
user.save()
do_set_realm_property(realm, "waiting_period_threshold", 1000, acting_user=None)