MCPcopy Create free account
hub / github.com/Flagsmith/flagsmith / clone

Method clone

api/features/models.py:328–339  ·  view source on GitHub ↗
(
        self,
        environment: "Environment",
        environment_feature_version: "EnvironmentFeatureVersion" = None,  # type: ignore[assignment]
    )

Source from the content-addressed store, hash-verified

326 return other and self.priority > other.priority
327
328 def clone(
329 self,
330 environment: "Environment",
331 environment_feature_version: "EnvironmentFeatureVersion" = None, # type: ignore[assignment]
332 ) -> "FeatureSegment":
333 clone = deepcopy(self)
334 clone.id = None
335 clone.uuid = uuid.uuid4()
336 clone.environment = environment
337 clone.environment_feature_version = environment_feature_version
338 clone.save()
339 return clone
340
341 # noinspection PyTypeChecker
342 def get_value(self): # type: ignore[no-untyped-def]

Callers

nothing calls this directly

Calls 1

saveMethod · 0.45

Tested by

no test coverage detected