Skip to content
Open
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
4 changes: 2 additions & 2 deletions multifunctional/custom_allocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,13 @@ def add_custom_property_allocation_to_project(


def update_allocation_strategies_on_project_change(
project_dataset: ProjectDataset,
sender, *, dataset: ProjectDataset, **kwargs
) -> None:
"""Fix the single dict `allocation_strategies` to reflect custom data for this project."""
for obsolete in set(allocation_strategies).difference(DEFAULT_ALLOCATIONS):
del allocation_strategies[obsolete]

for key, value in project_dataset.data.get("multifunctional.custom_allocations", {}).items():
for key, value in dataset.data.get("multifunctional.custom_allocations", {}).items():
allocation_strategies[key] = property_allocation(**value)


Expand Down
Loading