diff --git a/district/management/commands/octopus_people_import.py b/district/management/commands/octopus_people_import.py index 100857ddf2ab85f44d633f0e00be82bf1c8db307..16e331a44d756f5ba214623cd1e88ab9bac15d8c 100644 --- a/district/management/commands/octopus_people_import.py +++ b/district/management/commands/octopus_people_import.py @@ -33,6 +33,10 @@ class Command(BaseCommand): for people_page in DistrictPeoplePage.objects.all(): for team in people_page.get_syncable_octopus_teams(): + if not hasattr(people_page.root_page, "image_collection_id"): + # FIXME: This should not be UniwebHomePage, but sometimes it is. + continue + collection_id = people_page.root_page.image_collection_id if collection_id is None: