Skip to content
Snippets Groups Projects

Notify sponsors about ending roles

Merged Andreas Ellewsen requested to merge GREG-162-notify-role-ending into master
3 files
+ 103
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -40,6 +40,7 @@ class Command(BaseCommand):
@@ -40,6 +40,7 @@ class Command(BaseCommand):
organizational_unit=unit,
organizational_unit=unit,
source=self.CEREBRUM_SOURCE,
source=self.CEREBRUM_SOURCE,
automatic=True,
automatic=True,
 
hierarchical_access=False,
)
)
if created:
if created:
logger.info("sponsor_ou_link_create", sponsor=sponsor.id, sunit=sunit.id)
logger.info("sponsor_ou_link_create", sponsor=sponsor.id, sunit=sunit.id)
@@ -119,7 +120,7 @@ class Command(BaseCommand):
@@ -119,7 +120,7 @@ class Command(BaseCommand):
active_units = OrganizationalUnit.objects.filter(
active_units = OrganizationalUnit.objects.filter(
active=True,
active=True,
deleted=False,
deleted=False,
)
).exclude(identifiers__value__in=[])
logger.info("import_start", nr_of_units=len(active_units))
logger.info("import_start", nr_of_units=len(active_units))
for unit in active_units:
for unit in active_units:
Loading