From d073c7d268076945b3affe7e84c4f9bd24f4fc1f Mon Sep 17 00:00:00 2001 From: Kaitlyn Crawford Date: Mon, 5 Feb 2018 12:20:10 +0200 Subject: [PATCH] Randomise into static segments when they are created --- src/wagtail_personalisation/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wagtail_personalisation/forms.py b/src/wagtail_personalisation/forms.py index a946158..6183f4c 100644 --- a/src/wagtail_personalisation/forms.py +++ b/src/wagtail_personalisation/forms.py @@ -119,7 +119,7 @@ class SegmentAdminForm(WagtailAdminModelForm): request.user = user request.session = SessionStore(session_key=session.session_key) passes = adapter._test_rules(instance.get_rules(), request, instance.match_any) - if passes: + if passes and instance.randomise_into_segment(): users_to_add.append(user) instance.static_users.add(*users_to_add)