(self)
return defaults
returns a dictionary of default name value pairs to be filled in
        whenver there is a commit
returns a dictionary of default name value pairs to be filled in
        whenver there is a commit
returns a dictionary of default name value pairs to be filled in whenver there is a commit
def get_defaults(self):
        '''returns a dictionary of default name value pairs to be filled in
        whenver there is a commit'''
        defaults = {}
        from pyasm.biz import ProjectSetting

        autofill_pipeline_code = ProjectSetting.get_value_by_key('autofill_pipeline_code')
        if autofill_pipeline_code != 'false':
            base_search_type = self.get_base_search_type() 
            if base_search_type == 'sthpw/task':
                return defaults
            full_search_type = self.get_search_type()
            has_pipeline = SearchType.column_exists(full_search_type, "pipeline_code")
            if has_pipeline:
                from pyasm.biz import Pipeline
                pipelines = Pipeline.get_by_search_type(base_search_type)
                if len(pipelines) >= 1:
                    defaults['pipeline_code'] = pipelines[0].get_code()



        base_search_type = self.get_base_search_type() 
        if base_search_type != "sthpw/file":
            if self.column_exists("relative_dir"):
                parts = base_search_type.split("/")
                project_code = Project.get_project_code()
                defaults['relative_dir'] = '%s/%s' % (project_code, parts[1])


        return defaults
def get_defaults ( self ) : defaults = { } from pyasm . biz import ProjectSetting autofill_pipeline_code = ProjectSetting . get_value_by_key ( 'autofill_pipeline_code' ) if autofill_pipeline_code != 'false' : base_search_type = self . get_base_search_type ( ) if base_search_type == 'sthpw/task' : return defaults full_search_type = self . get_search_type ( ) has_pipeline = SearchType . column_exists ( full_search_type , "pipeline_code" ) if has_pipeline : from pyasm . biz import Pipeline pipelines = Pipeline . get_by_search_type ( base_search_type ) if len ( pipelines ) >= 1 : defaults [ 'pipeline_code' ] = pipelines [ 0 ] . get_code ( ) base_search_type = self . get_base_search_type ( ) if base_search_type != "sthpw/file" : if self . column_exists ( "relative_dir" ) : parts = base_search_type . split ( "/" ) project_code = Project . get_project_code ( ) defaults [ 'relative_dir' ] = '%s/%s' % ( project_code , parts [ 1 ] ) return defaults