Skip to content

Commit

Permalink
update annotations path
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorighi committed Oct 2, 2024
1 parent db16d8e commit e959175
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/rest/annotation/annotations_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from errors import NotFound
from helpers import data as data_helper, organism as organism_helper
from mongoengine.errors import ValidationError
import os


ANNOTATIONS_DATA_PATH = "/server/annotations_data"
ANNOTATIONS_DATA_PATH = os.getenv('ANNOTATIONS_PATH')
FIELDS_TO_EXCLUDE = ['id']
DATA_REQUIRED_FIELDS = ['name', 'assembly_accession']
URL_FIELDS = ['gff_gz_location', 'tab_index_location']
Expand Down Expand Up @@ -65,7 +65,7 @@ def extract_metadata(data):
valid_data['metadata'] = metadata_dict
return valid_data

def save_files(files, valid_data, assembly_accession, annotation_name, taxid, request):
def save_files(files, valid_data, assembly_accession, annotation_name, request):
for k in FILES_REQUIRED_FIELDS:
if not files.get(k):
return f'{k} field is required', 400
Expand Down Expand Up @@ -121,7 +121,7 @@ def create_annotation(request):

# Handle file saving
if files:
response = save_files(files, valid_data, assembly_accession, annotation_name, taxid, request)
response = save_files(files, valid_data, assembly_accession, annotation_name, request)
if response:
return response
else:
Expand Down

0 comments on commit e959175

Please sign in to comment.