flagsmith
flagsmith copied to clipboard
Factor out _import_targets and _import_rules calls so they're invoked directly from process_import_request rather than as a side effect.
Factor out _import_targets and _import_rules calls so they're invoked directly from process_import_request rather than as a side effect. Make the factory functions return created entities, including the MV options, so they can be used by later code, or think of some common context object that can be used throughout the import process. Rename factory functions to _create_boolean_feature_states_with_segments_identities and so on.
Created from: https://github.com/Flagsmith/flagsmith/pull/3233#discussion_r1471780610