(self)
return updates_by_case_type
Collate contributed case updates from all sources within the form

        Subclass must have helper methods defined:

        - get_case_updates
        - get_all_contributed_subcase_properties
        - get_save_to_case_updates

        :return: collated {<case_type>: set([<property>])}
Collate contributed case updates from all sources within the form
Collate contributed case updates from all sources within the form
def get_all_case_updates(self):
        """
        Collate contributed case updates from all sources within the form

        Subclass must have helper methods defined:

        - get_case_updates
        - get_all_contributed_subcase_properties
        - get_save_to_case_updates

        :return: collated {<case_type>: set([<property>])}

        """
        updates_by_case_type = defaultdict(set)

        for case_type, updates in self.get_case_updates().items():
            updates_by_case_type[case_type].update(updates)

        for case_type, updates in self.get_all_contributed_subcase_properties().items():
            updates_by_case_type[case_type].update(updates)

        for case_type, updates in self.get_save_to_case_updates().items():
            updates_by_case_type[case_type].update(updates)

        return updates_by_case_type
def get_all_case_updates ( self ) : updates_by_case_type = defaultdict ( set ) for case_type , updates in self . get_case_updates ( ) . items ( ) : updates_by_case_type [ case_type ] . update ( updates ) for case_type , updates in self . get_all_contributed_subcase_properties ( ) . items ( ) : updates_by_case_type [ case_type ] . update ( updates ) for case_type , updates in self . get_save_to_case_updates ( ) . items ( ) : updates_by_case_type [ case_type ] . update ( updates ) return updates_by_case_type