Skip to content

Commit

Permalink
Fix constants reference
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanzhou committed Nov 21, 2023
1 parent 393d40f commit 8ec3fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/schema/schema_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ def get_user_info(request):
def get_hubmap_ids(id):
global _uuid_api_url

target_url = _uuid_api_url + schema_constants.UUID_API_ID_ENDPOINT + '/' + id
target_url = _uuid_api_url + SchemaConstants.UUID_API_ID_ENDPOINT + '/' + id

# Use Memcached to improve performance
response = make_request_get(target_url, internal_token_used = True)
Expand Down Expand Up @@ -1373,7 +1373,7 @@ def create_hubmap_ids(normalized_class, json_data_dict, user_token, user_info_di
logger.info(json_to_post)

# Disable ssl certificate verification
target_url = _uuid_api_url + schema_constants.UUID_API_ID_ENDPOINT
target_url = _uuid_api_url + SchemaConstants.UUID_API_ID_ENDPOINT
response = requests.post(url = target_url, headers = request_headers, json = json_to_post, verify = False, params = query_parms)

# Invoke .raise_for_status(), an HTTPError will be raised with certain status codes
Expand Down
8 changes: 4 additions & 4 deletions src/schema/schema_triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ def commit_thumbnail_file(property_key, normalized_type, user_token, existing_da
entity_uuid = existing_data_dict['uuid']

# Commit the thumbnail file via ingest-api call
ingest_api_target_url = schema_manager.get_ingest_api_url() + schema_constants.INGEST_API_FILE_COMMIT_ENDPOINT
ingest_api_target_url = schema_manager.get_ingest_api_url() + SchemaConstants.INGEST_API_FILE_COMMIT_ENDPOINT

# Example: {"temp_file_id":"dzevgd6xjs4d5grmcp4n"}
thumbnail_file_dict = new_data_dict[property_key]
Expand Down Expand Up @@ -1296,7 +1296,7 @@ def delete_thumbnail_file(property_key, normalized_type, user_token, existing_da
file_info_dict = generated_dict[target_property_key]

# Remove the thumbnail file via ingest-api call
ingest_api_target_url = schema_manager.get_ingest_api_url() + schema_constants.INGEST_API_FILE_REMOVE_ENDPOINT
ingest_api_target_url = schema_manager.get_ingest_api_url() + SchemaConstants.INGEST_API_FILE_REMOVE_ENDPOINT

# ingest-api's /file-remove takes a list of files to remove
# In this case, we only need to remove the single thumbnail file
Expand Down Expand Up @@ -1905,7 +1905,7 @@ def _commit_files(target_property_key, property_key, normalized_type, user_token
entity_uuid = existing_data_dict['uuid']

# Commit the files via ingest-api call
ingest_api_target_url = schema_manager.get_ingest_api_url() + schema_constants.INGEST_API_FILE_COMMIT_ENDPOINT
ingest_api_target_url = schema_manager.get_ingest_api_url() + SchemaConstants.INGEST_API_FILE_COMMIT_ENDPOINT

for file_info in new_data_dict[property_key]:
temp_file_id = file_info['temp_file_id']
Expand Down Expand Up @@ -2015,7 +2015,7 @@ def _delete_files(target_property_key, property_key, normalized_type, user_token
file_uuids.append(file_uuid)

# Remove the files via ingest-api call
ingest_api_target_url = schema_manager.get_ingest_api_url() + schema_constants.INGEST_API_FILE_REMOVE_ENDPOINT
ingest_api_target_url = schema_manager.get_ingest_api_url() + SchemaConstants.INGEST_API_FILE_REMOVE_ENDPOINT

json_to_post = {
'entity_uuid': entity_uuid,
Expand Down

0 comments on commit 8ec3fd0

Please sign in to comment.