Created
February 18, 2020 12:13
-
-
Save Ingco/5c3cb9ec941a70e852172ffea297e172 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
order = ( | |
Order.objects | |
.select_related("patient", "client") | |
.prefetch_related( | |
"orderstep_order__orderstepmisc_orderstep__misc", | |
"orderstep_order__orderstepjob_orderstep" | |
) | |
.annotate(orderstep_order__row_number=number_subquery) | |
.filter(pk=pk) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment