7

Add Adapter.set_segments() and use it when refreshig the segment

This makes the internal API a bit more consistent
This commit is contained in:
Michael van Tellingen
2017-05-31 15:14:32 +02:00
parent decfc88efe
commit f2aa8879a9
4 changed files with 17 additions and 13 deletions

View File

@ -74,7 +74,7 @@ def serve_variation(page, request, serve_args, serve_kwargs):
user_segments = []
adapter = get_segment_adapter(request)
for segment in adapter.get_all_segments():
for segment in adapter.get_segments():
try:
user_segment = Segment.objects.get(
pk=segment['id'], status=Segment.STATUS_ENABLED)