def get_shared_case_types(app): shared_case_types = set() if app.case_sharing: apps = get_case_sharing_apps_in_domain(app.domain, app.id) for app in apps: shared_case_types |= set(chain(*[m.get_case_types() for m in app.get_modules()])) return shared_case_types
def get_shared_case_types(app): shared_case_types = set() if app.case_sharing: apps = get_case_sharing_apps_in_domain(app.domain, app.id) for app in apps: shared_case_types |= set(chain(*[m.get_case_types() for m in app.get_modules()])) return shared_case_types
def for_app(cls, app, defaults=(), include_parent_properties=True, exclude_invalid_properties=False): apps = [app] if app.case_sharing: apps.extend(get_case_sharing_apps_in_domain(app.domain, app.id)) return cls(app.domain, apps, defaults=defaults, include_parent_properties=include_parent_properties, exclude_invalid_properties=exclude_invalid_properties)
def for_app(cls, app, defaults=(), include_parent_properties=True, exclude_invalid_properties=False): apps = [app] if app.case_sharing: apps.extend(get_case_sharing_apps_in_domain(app.domain, app.id)) return cls(app.domain, apps, defaults=defaults, include_parent_properties=include_parent_properties, exclude_invalid_properties=exclude_invalid_properties)
def get_other_case_sharing_apps_in_domain(self): return get_case_sharing_apps_in_domain(self.app.domain, self.app.id)
def get_other_case_sharing_apps_in_domain(self): return get_case_sharing_apps_in_domain(self.app.domain, self.app.id)