from importlib import import_module

from django.core.management.base import BaseCommand

from core import logic


class Command(BaseCommand):
    """A management command to build all assets across the platform's themes.."""

    help = "Synchronizes unspecified default settings to all journals."

    def handle(self, *args, **options):
        themes = logic.get_theme_list()

        for theme in themes:
            module_name = "themes.{0}.build_assets".format(theme[0])
            builder = import_module(module_name)
            builder.build()

@@ -106,16 +106,83 @@
 t logic%0A
+from utils.logger import get_logger%0A%0Alogger = get_logger(__name__)%0A
 %0A%0Aclass 
@@ -283,10 +283,8 @@
 emes
-..
 %22%22%22%0A
@@ -536,16 +536,37 @@
 eme%5B0%5D)%0A
+            try:%0A    
         
@@ -606,16 +606,182 @@
 e_name)%0A
+            except ModuleNotFoundError:%0A                logger.info(%0A                    %22Theme '%25s' doesn't implement 'build_assets'.%22, theme)%0A            else:%0A    
         

Fix build_assets crash when a theme does not implement one