Skip to content

Commit

Permalink
fix migration to signup flow and structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jeriox committed Sep 21, 2024
1 parent 37e5fcd commit fa2e7d9
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from dynamic_preferences.registries import global_preferences_registry

import ephios.extra.json
from ephios.core.dynamic_preferences_registry import EnabledPlugins
from ephios.core.services.qualification import QualificationUniverse
from ephios.plugins.baseshiftstructures.structure.named_teams import NamedTeamsShiftStructure
from ephios.plugins.baseshiftstructures.structure.uniform import UniformShiftStructure
Expand Down Expand Up @@ -109,8 +108,11 @@ def copy_structure_configuration_to_signup_flow_configuration(apps, schema_edito

def enable_new_plugins(apps, schema_editor):
preferences = global_preferences_registry.manager()
preferences[EnabledPlugins().identifier()] = list(
set(preferences[EnabledPlugins().identifier()])
enabled_plugins = preferences["general__enabled_plugins"]
if "ephios.plugins.basesignup" in enabled_plugins:
enabled_plugins.remove("ephios.plugins.basesignup")
preferences["general__enabled_plugins"] = list(
set(enabled_plugins)
| {
"ephios.plugins.basesignupflows",
"ephios.plugins.baseshiftstructures",
Expand Down

0 comments on commit fa2e7d9

Please sign in to comment.