Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for tabular metadata uploads that only contain one row #1479

Merged
merged 5 commits into from
Oct 26, 2016

Conversation

scottx611x
Copy link
Member

Fixes #1463

@scottx611x scottx611x changed the title Handle one-off 400 error and add logic when empty facet_fields occurs Fix for tabular metadata uploads that only contain one row Oct 17, 2016
@codecov-io
Copy link

codecov-io commented Oct 17, 2016

Current coverage is 35.24% (diff: 0.00%)

Merging #1479 into develop will increase coverage by 0.50%

@@            develop      #1479   diff @@
==========================================
  Files           338        338           
  Lines         23393      24963   +1570   
  Methods           0          0           
  Messages          0          0           
  Branches       1238       1337     +99   
==========================================
+ Hits           8126       8798    +672   
- Misses        15267      16165    +898   
  Partials          0          0           

Powered by Codecov. Last update 2dbdf15...73b6c08

@jkmarx
Copy link
Member

jkmarx commented Oct 19, 2016

@scottx611x @ngehlenborg
Did you decide if we should handle the matrix page? Provenance also appears broken for a single row data set. Is this expected? I'm using data set 15826: ChipSeq of MLL1 in mouse leukemic blast cells

screen shot 2016-10-19 at 4 36 23 pm

for ( var i = 0; i < response.response.docs.length; ++i ) {
documentList.push( response.response.docs[i] );
}

return documentList;
}


SolrResponse.prototype._processPivotCounts = function ( response ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self._pivotCounts = self._processPivotCounts(response)
The default value for self._pivotCount = {}
I'd recommend setting an else with {}, even though no extra errors seem to be thrown.

url = settings.REFINERY_SOLR_BASE_URL + core + "/select"
data = request.GET.urlencode()
try:
full_response = requests.get(url, params=data)
full_response.raise_for_status()
# Solr sends back an additional 400 here in the data_sets 1 filebrowser
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API will stick around. It's used as a UI common services solr.js, which is used by multiple features.

# interacts with Solr doesn't produce this extra 400 error
if ("Pivot Facet needs at least one field name"
not in full_response.content):
full_response.raise_for_status()
response = full_response.content
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in the 'else' clause of the 'try' block

@scottx611x scottx611x merged commit 2577b08 into develop Oct 26, 2016
@scottx611x scottx611x deleted the scottx611x/single_row_metadata_fix branch October 26, 2016 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants