Skip to content

Commit 6f78199

Browse files
TypeError fixed, changed parameter from dict to str. (#83)
* TypeError fixed, changed parameter from dict to str. * dictionary access method changed and error message added. * Exception added. * Readability fix.
1 parent 167e37c commit 6f78199

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hydra_python_core/doc_maker.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ def create_doc(doc: Dict[str, Any], HYDRUS_SERVER_URL: str = None,
105105
if HYDRUS_SERVER_URL is not None and API_NAME is not None:
106106
apidoc = HydraDoc(
107107
API_NAME, _title, _description, API_NAME, HYDRUS_SERVER_URL, doc_name)
108-
else:
108+
elif entrypoint.get('@id') is not None:
109109
apidoc = HydraDoc(
110-
entrypoint, _title, _description, entrypoint, base_url, doc_name)
110+
entrypoint.get('@id'), _title, _description, entrypoint.get('@id'), base_url, doc_name)
111+
else:
112+
raise Exception("No EntryPoint found, please set the API variables.")
111113

112114
# additional context entries
113115
for entry in _context:

0 commit comments

Comments
 (0)