Skip to content

Commit

Permalink
Fix edit_form_query documentation example (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeclimen authored Jun 11, 2024
1 parent d062cfa commit b51c952
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/cookbook/optimize_relationship_loading.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ class ParentAdmin(ModelView, model=Parent):
def edit_form_query(self, request: Request) -> Select:
parent_id = request.path_params["pk"]
return (
super()
.edit_form_query(request)
self._stmt_by_identifier(parent_id)
.join(Child)
.options(contains_eager(Parent.children))
.filter(Child.parent_id == parent_id)
Expand Down

0 comments on commit b51c952

Please sign in to comment.