Skip to content

Conversation

ebreton
Copy link
Contributor

@ebreton ebreton commented May 20, 2019

This is a one-line fix to avoid the crash of the application in certain edge cases, where you defined an SQLAlchemy relationship where one of the model is not yet imported at the time the application creates it initial data.

See Issue #28 for all the details

Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Help me with a couple of minor changes.

@ebreton
Copy link
Contributor Author

ebreton commented May 21, 2019

I will do that tomorrow 👌

@ebreton
Copy link
Contributor Author

ebreton commented May 22, 2019

Good morning @tiangolo , the from app.db import base works fine 🎶 . Changed made, and comment added.

Let me know whether there is anything else. I was hesitating for instance to add a new SubItem db_models to get automated testing and avoid regression (as described in #28), but I didn't... it seemed like too much noise...

@tiangolo tiangolo merged commit 1d30172 into fastapi:master May 22, 2019
@tiangolo
Copy link
Member

Awesome! Thanks a lot for your work 🎉 🍰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants