-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conversation
… any other 400 error happen to occur
facet_fields
occurs
Current coverage is 35.24% (diff: 0.00%)@@ 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
|
@scottx611x @ngehlenborg |
for ( var i = 0; i < response.response.docs.length; ++i ) { | ||
documentList.push( response.response.docs[i] ); | ||
} | ||
|
||
return documentList; | ||
} | ||
|
||
|
||
SolrResponse.prototype._processPivotCounts = function ( response ) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
Fixes #1463