Пример #1
0
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
Пример #2
0
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
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 def get_other_case_sharing_apps_in_domain(self):
     return get_case_sharing_apps_in_domain(self.app.domain, self.app.id)
Пример #6
0
 def get_other_case_sharing_apps_in_domain(self):
     return get_case_sharing_apps_in_domain(self.app.domain, self.app.id)