-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seq doesn't work for timezone aware datetime objects #322
Comments
Hello @knyghty
Other example this is https://github.com/model-bakers/model_bakery/blob/main/tests/test_utils.py#L146 |
@HigorMonteiro I suppose it's not necessary no, as long as everything comes out in UTC. However I do find this behaviour a bit odd and I would expect it to work with aware datetimes. I actually find it a bit confusing that it silently converts naive datetimes into aware ones but chokes on already aware datetimes - I find it cleaner to deal with explicitly aware datetimes where possible. |
I would tend to agree with @knyghty and it should be a relatively simple fix. |
Hey @knyghty ! We released the fix for this issue in model-bakery 1.9.0. |
Expected behavior
I expect to get a generator of datetimes.
Actual behavior
I got an exception.
Reproduction Steps
Versions
Python: 3.10
Django: 4.0.5
Model Bakery: 1.5.0
The text was updated successfully, but these errors were encountered: