Skip to content

Commit

Permalink
CU-862hxw03e: remove prev bad merge view endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
tomolopolis committed Aug 4, 2023
1 parent a7aeb25 commit c3c678f
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions webapp/api/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,24 +602,6 @@ def search_solr(request):
return search_collection(cdbs, query)


@api_view(http_method_names=['DELETE', 'POST'])
def cache_model(request, p_id):
method = request.method
project = ProjectAnnotateEntities.objects.get(id=p_id)
cat = get_cached_medcat(CAT_MAP=CAT_MAP, project=project)
if method == 'POST':
if cat is None:
get_medcat(CDB_MAP=CDB_MAP, VOCAB_MAP=VOCAB_MAP,
CAT_MAP=CAT_MAP, project=project)
return Response({'result': f'Successfully loaded model for project:{p_id}'})
else:
return Response({'result': f'Model already loaded for project:{p_id}'})
else:
clear_cached_medcat(CAT_MAP, project)
logger.info(f'Cleared cached model{p_id}')
return Response({'result': f'Cleared cached model:{p_id}'})


@api_view(http_method_names=['POST'])
def upload_deployment(request):
deployment_upload = request.data
Expand Down

0 comments on commit c3c678f

Please sign in to comment.