What change does this make? This adds Sesson.refresh(obj) call to the SQLAlchemy object created during a POST request. Calling refresh() after the object has been added and the session flushed causes any timezone-aware datetime attribute deserialized from the incoming request to be re-read from the database as timezone-naive datetime if the database is configured that way.
How does this affect the user? This corrects a bug in which the response to a POST request incorrectly still showed the timezone-aware datetime attribute even though the database was storing only the timezone-naive datetime attribute.
Partially fixes issue #630.
What change does this make? This adds
Sesson.refresh(obj)
call to the SQLAlchemy object created during a POST request. Callingrefresh()
after the object has been added and the session flushed causes any timezone-aware datetime attribute deserialized from the incoming request to be re-read from the database as timezone-naive datetime if the database is configured that way.How does this affect the user? This corrects a bug in which the response to a POST request incorrectly still showed the timezone-aware datetime attribute even though the database was storing only the timezone-naive datetime attribute.