Created
November 2, 2022 12:04
-
-
Save rootisenabled/1815a072cd804d1de4320ccf2eb7ea87 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cloud.mountingsurface.models import MountingSurface | |
from cloud.businessunits.models import BusinessUnit | |
bu_copy_from = BusinessUnit.objects.get(slug='otovo-nl') | |
bu_copy_to = BusinessUnit.objects.get(slug='otovo-be') | |
ms = MountingSurface.get_valid_choices_by_business_unit(bu_copy_from) | |
for m in ms: | |
m.pk = None | |
m.business_unit = bu_copy_to | |
m.save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment