-
Notifications
You must be signed in to change notification settings - Fork 100
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
Method .to_dict() in core does not output the up to date object #29
Comments
.to_dict()
.to_dict()
in core
does not output the up to date object
.to_dict()
in core
does not output the up to date object.to_dict()
in core
does not output the up to date object
.to_dict()
in core
does not output the up to date object
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is my model:
This is the route:
Issue: If I execute this code, the logger and the create response will output a null id:
Expectation: Once we perform the commit, the object properties are available. I've confirmed this by printing/logging the id of the person using
person.id
, and it outputs the correct value.to_dict()
outputs null instead of the correct value. It doesn't seem to have the committed object.Interestingly enough if I uncomment the
logger.info
line, or if I add db.session.refresh(), theto_dict()
outputs the correct result.This is the result when I execute it with the line
# logger.info(f"id: ",person.id)
uncommented.The text was updated successfully, but these errors were encountered: