(self)
This checks to see if the paths specified in the multimedia map still exist in the Application.
            If not, then that item is removed from the multimedia map.
This checks to see if the paths specified in the multimedia map still exist in the Application.
            If not, then that item is removed from the multimedia map.
This checks to see if the paths specified in the multimedia map still exist in the Application . If not then that item is removed from the multimedia map .
def remove_unused_mappings(self):
        """
            This checks to see if the paths specified in the multimedia map still exist in the Application.
            If not, then that item is removed from the multimedia map.
        """
        map_changed = False
        if self.check_media_state()['has_form_errors']:
            return
        paths = list(self.multimedia_map) if self.multimedia_map else []
        permitted_paths = self.all_media_paths() | self.logo_paths
        for path in paths:
            if path not in permitted_paths:
                map_item = self.multimedia_map[path]
                map_changed = True
                del self.multimedia_map[path]

        if map_changed:
            self.save()
def remove_unused_mappings ( self ) : map_changed = False if self . check_media_state ( ) [ 'has_form_errors' ] : return paths = list ( self . multimedia_map ) if self . multimedia_map else [ ] permitted_paths = self . all_media_paths ( ) | self . logo_paths for path in paths : if path not in permitted_paths : map_item = self . multimedia_map [ path ] map_changed = True del self . multimedia_map [ path ] if map_changed : self . save ( )