def get(self, user): apps = SchedulerState.get_available_apps() if not is_admin(user): apps = {k: v for k, v in apps.items() if v['activated']} formated = [] defaults_apps = SchedulerState.get_default_scheduled_apps( serialized=False) defaults_apps_names = [x['name'] for x in defaults_apps] for x in apps: ext_app = apps[x] ext_app['scheduled'] = False if ( x not in defaults_apps_names) else True formated.append(ext_app) return formated
def get(self, user): return SchedulerState.get_default_scheduled_apps(serialized=True)