Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always enable segments #6276

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bluebottle/members/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def impact_hours_info(self, obj):
_('Profile'),
{
'fields': (
'enable_gender', 'enable_birthdate', 'enable_segments',
'enable_gender', 'enable_birthdate',
'enable_address', 'create_segments'
)
}
Expand Down
24 changes: 24 additions & 0 deletions bluebottle/members/migrations/0085_auto_20250203_1201.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 3.2.20 on 2025-02-03 11:01

import bluebottle.bb_accounts.models
import bluebottle.files.fields
import bluebottle.utils.validators
from django.db import migrations, models
import django.db.models.deletion
import multiselectfield.db.fields


class Migration(migrations.Migration):

dependencies = [
('files', '0012_auto_20250113_1704'),
('offices', '0004_add_permissions_20230130_1255'),
('members', '0084_merge_20250109_0820'),
]

operations = [
migrations.RemoveField(
model_name='memberplatformsettings',
name='enable_segments',
),
]
6 changes: 0 additions & 6 deletions bluebottle/members/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ class MemberPlatformSettings(BasePlatformSettings):
help_text=_('Show address question in profile form')
)

enable_segments = models.BooleanField(
_('email segments'),
default=False,
help_text=_('Enable segments for users e.g. department or job title.')
)

create_segments = models.BooleanField(
_('create segments'),
default=False,
Expand Down
1 change: 0 additions & 1 deletion bluebottle/settings/admin_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
"label": _("Segments"),
"app_label": "segments",
"permissions": ["segments.change_segmenttype"],
"enabled": "members.MemberPlatformSettings.enable_segments",
"items": [
{
"label": _("All segment types"),
Expand Down
3 changes: 0 additions & 3 deletions bluebottle/token_auth/tests/test_saml.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ def test_auth_existing_with_office_name(self):

def test_auth_existing_with_segment(self):
member_settings = MemberPlatformSettings.load()
member_settings.enable_segments = True
member_settings.create_segments = True
member_settings.save()

Expand Down Expand Up @@ -402,7 +401,6 @@ def test_auth_existing_with_segment(self):

def test_auth_existing_with_segment_slug(self):
member_settings = MemberPlatformSettings.load()
member_settings.enable_segments = True
member_settings.create_segments = True
member_settings.save()

Expand Down Expand Up @@ -442,7 +440,6 @@ def test_auth_existing_with_office_and_segment(self):

LocationFactory.create(slug='user', name='User Office')
member_settings = MemberPlatformSettings.load()
member_settings.enable_segments = True
member_settings.create_segments = True
member_settings.save()
SegmentTypeFactory.create(slug='function', name='Function')
Expand Down