Skip to content

Commit

Permalink
[fix] Language NLP
Browse files Browse the repository at this point in the history
  • Loading branch information
dyohan9 committed Nov 14, 2019
1 parent 06d4900 commit 67f9af7
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bothub/api/v2/nlp/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,13 @@ def retrieve(self, request, *args, **kwargs):
check_auth(request)
repository_authorization = self.get_object()
repository = repository_authorization.repository
update = repository.last_trained_update(
str(request.query_params.get("language"))
)

language = request.query_params.get("language")

if language == "None" or language is None:
language = str(repository.language)

update = repository.last_trained_update(language)
try:
return Response(
{
Expand Down

0 comments on commit 67f9af7

Please sign in to comment.