-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
In general, when GET
ting a Changemaker
, we want all the relevant details, including deep/gold field values. But in general, when GET
ting a Source
, we do not want nor need the deep/gold field values. It should be a shallow changemaker.
See changemaker_to_json
defined thus:
CREATE FUNCTION changemaker_to_json(
changemaker changemakers,
auth_context_keycloak_user_id uuid DEFAULT NULL,
shallow boolean DEFAULT FALSE
)
And use within source_to_json
:
SELECT changemaker_to_json(changemakers.*)
INTO changemaker_json
FROM changemakers
WHERE changemakers.id = source.changemaker_id;
I would have pushed a PR instead but I want to make sure we agree this is an issue.
Metadata
Metadata
Assignees
Labels
No labels