def update()

in experimenter/experimenter/experiments/api/v5/serializers.py [0:0]


    def update(self, experiment, validated_data):
        if (
            experiment.is_rollout
            and validated_data.get("population_percent") != experiment.population_percent
        ) and (
            not experiment.is_paused
            and experiment.status == NimbusExperiment.Status.LIVE
            and experiment.status_next is None
            and experiment.publish_status == NimbusExperiment.PublishStatus.IDLE
            and validated_data.get("publish_status")
            != NimbusConstants.PublishStatus.REVIEW
        ):
            # can be Live Update (Dirty), End Enrollment, or End Experiment
            # (including rejections) if we don't check validated_data
            validated_data["is_rollout_dirty"] = True

        self.changelog_message = validated_data.pop("changelog_message")
        return super().update(experiment, validated_data)