

def handle(self, *args, **options):
    if (not args):
        apps = []
        for model in get_models():
            try:
                apps.append(get_app(model._meta.app_label))
            except ImproperlyConfigured:
                continue
    else:
        apps = []
        for arg in args:
            apps.append(get_app(arg))
    for app in apps:
        create_permissions(app, get_models(), options.get('verbosity', 0))

dataset/ETHPy150Open scieloorg/scielo-manager/scielomanager/journalmanager/management/commands/sync_perms.py Command.handle/original