Skip to content

Commit

Permalink
climate tempfolders update single file entries on change #62
Browse files Browse the repository at this point in the history
  • Loading branch information
FlatErikk committed Oct 16, 2024
1 parent 692e0d7 commit 47cb9fd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions framework/climate/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ def access_tif_from_ncfile(request):
return HttpResponse(content=f"The raw file could not be converted. Reason: {msg}", status=500)

# update file in tempfolders_content
# if update_doc or update_tif:
# update_tempfolder_file(foldertype, filename)
if update_doc or update_tif:
update_tempfolder_file(foldertype, filename)

tif_filename = copy_filename_as_tif(filename)
# cache_dir = folder_list['cache'][foldertype]
Expand Down Expand Up @@ -535,7 +535,7 @@ def get_ncfile_metadata(request):
succ, msg = extract_ncfile_metadata(filename, source_dir, foldertype)
if succ:
# update file in tempfolders_content
# update_tempfolder_file(foldertype, filename)
update_tempfolder_file(foldertype, filename)

new_doc: TempResultFile = msg
return JsonResponse({'metadata': new_doc.get_file_metadata()})
Expand All @@ -547,7 +547,7 @@ def get_ncfile_metadata(request):
succ, msg = extract_ncfile_metadata(filename, source_dir, foldertype)
if succ:
# update file in tempfolders_content
# update_tempfolder_file(foldertype, filename)
update_tempfolder_file(foldertype, filename)

new_doc: TempResultFile = msg
return JsonResponse({'metadata': new_doc.get_file_metadata()})
Expand Down Expand Up @@ -982,8 +982,8 @@ def serve_tif_file(self, filepath, filename, foldertype):
return HttpResponse(content=f"The raw file could not be converted. Reason: {msg}", status=500)

# update file in tempfolders_content
# if update_doc or update_tif:
# update_tempfolder_file(foldertype, filename)
if update_doc or update_tif:
update_tempfolder_file(foldertype, filename)

tif_filename = copy_filename_as_tif(filename)
cache_dir = folder_list['cache'][foldertype]
Expand Down

0 comments on commit 47cb9fd

Please sign in to comment.