Skip to content

Source object should have a shallow Changemaker #1844

@bickelj

Description

@bickelj

In general, when GETting a Changemaker, we want all the relevant details, including deep/gold field values. But in general, when GETting 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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions