Files
notifications-api/app/schemas.py
Chris Hill-Scott 58a9862cd1 Avoid extra query when serialising Template created_by
It’s a UUID column, but by default Marshmallow wants to select the id
from the users table, not from the templates table, because the two
are foreign-keyed.

Adding the property explicity like this forces it to select from the
`created_by_id` column, but still serialises it to the `created_by`
field to avoid any breaking change.
2020-06-22 14:07:43 +01:00

22 KiB