We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0cae14 commit 6206fccCopy full SHA for 6206fcc
api/odl2.py
@@ -223,11 +223,12 @@ def _extract_publication_metadata(
223
if odl_license.metadata.terms
224
else None
225
)
226
- concurrency = (
227
- int(odl_license.metadata.terms.concurrency)
228
- if odl_license.metadata.terms
229
- else None
230
- )
+ try:
+ # Try to convert the concurrency value to an integer.
+ concurrency = int(odl_license.metadata.terms.concurrency)
+ except (AttributeError, ValueError, TypeError):
+ # If concurrency is missing, not an int, or terms is invalid, default to None.
231
+ concurrency = None
232
233
if not license_info_document_link:
234
parsed_license = None
0 commit comments