Skip to content

Allow to omit traits and environment API keys in dumporganisationdatatolocalfs #6769

@khvn26

Description

@khvn26

Symptom: loaddata raises IntegrityError when the target database already contains the same trait or API key.

Root cause: Both models define natural_key() (used during serialisation) but their managers lack get_by_natural_key() (needed during deserialisation). Without it, loaddata always attempts an INSERT rather than an UPDATE, hitting unique constraints.

Fix: To dumporganisationdatatolocalfs CLI management command, add an option to omit traits and environment keys entirely — these updates are not expected to be needed for the air-gapped env use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssue related to the REST API

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions