def post_add(self, table): try: table.fetch_metadata() except Exception as e: logging.exception(e) flash( "Table [{}] doesn't seem to exist, " "couldn't fetch metadata".format(table.table_name), "danger") utils.merge_perm(sm, 'datasource_access', table.perm)
def post_add(self, datasource): datasource.generate_metrics() utils.merge_perm(sm, 'datasource_access', datasource.perm)