dcicutils 8.14.0.1b8__py3-none-any.whl → 8.14.0.1b9__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- dcicutils/scripts/view_portal_object.py +7 -11
- {dcicutils-8.14.0.1b8.dist-info → dcicutils-8.14.0.1b9.dist-info}/METADATA +1 -1
- {dcicutils-8.14.0.1b8.dist-info → dcicutils-8.14.0.1b9.dist-info}/RECORD +6 -6
- {dcicutils-8.14.0.1b8.dist-info → dcicutils-8.14.0.1b9.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.14.0.1b8.dist-info → dcicutils-8.14.0.1b9.dist-info}/WHEEL +0 -0
- {dcicutils-8.14.0.1b8.dist-info → dcicutils-8.14.0.1b9.dist-info}/entry_points.txt +0 -0
@@ -330,6 +330,8 @@ def _get_portal_object(portal: Portal, uuid: str,
|
|
330
330
|
results_total = len(results)
|
331
331
|
for result in results:
|
332
332
|
results_index += 1
|
333
|
+
if debug:
|
334
|
+
print(f"Processing result: {results_index}")
|
333
335
|
result.pop("schema_version", None)
|
334
336
|
result = prune_data(result)
|
335
337
|
if (subtypes and one_or_more_objects_of_types_exists(portal, subtypes, debug=debug) and
|
@@ -374,14 +376,7 @@ def _get_portal_object(portal: Portal, uuid: str,
|
|
374
376
|
|
375
377
|
def one_or_more_objects_of_types_exists(portal: Portal, schema_types: List[str], debug: bool = False) -> bool:
|
376
378
|
for schema_type in schema_types:
|
377
|
-
|
378
|
-
if one_or_more_objects_of_type_exists(portal, schema_type, debug=debug):
|
379
|
-
return True
|
380
|
-
response = portal.get(f"/{schema_type}")
|
381
|
-
if response and response.status_code == 404:
|
382
|
-
_print(f"There are no objects of sub-type: {schema_type}")
|
383
|
-
return False
|
384
|
-
except Exception:
|
379
|
+
if one_or_more_objects_of_type_exists(portal, schema_type, debug=debug):
|
385
380
|
return True
|
386
381
|
return False
|
387
382
|
|
@@ -393,14 +388,15 @@ def one_or_more_objects_of_type_exists(portal: Portal, schema_type: str, debug:
|
|
393
388
|
_print(f"Checking if there are actually any objects of type: {schema_type}")
|
394
389
|
if portal.get(f"/{schema_type}").status_code == 404:
|
395
390
|
if debug:
|
396
|
-
_print(f"No
|
391
|
+
_print(f"No objects of type actually exist: {schema_type}")
|
392
|
+
return False
|
397
393
|
else:
|
398
394
|
if debug:
|
399
395
|
_print(f"One or more objects of type exist: {schema_type}")
|
400
396
|
except Exception as e:
|
401
|
-
_print(f"ERROR:
|
397
|
+
_print(f"ERROR: Cannot determine if there are actually any objects of type: {schema_type}")
|
402
398
|
_print(e)
|
403
|
-
return
|
399
|
+
return True
|
404
400
|
|
405
401
|
|
406
402
|
@lru_cache(maxsize=1)
|
@@ -61,7 +61,7 @@ dcicutils/schema_utils.py,sha256=GmRm-XqZKJ6qine16SQF1txcby9WougDav_sYmKNs9E,124
|
|
61
61
|
dcicutils/scripts/publish_to_pypi.py,sha256=sMd4WASQGlxlh7uLrt2eGkFRXYgONVmvIg8mClMS5RQ,13903
|
62
62
|
dcicutils/scripts/run_license_checker.py,sha256=z2keYnRDZsHQbTeo1XORAXSXNJK5axVzL5LjiNqZ7jE,4184
|
63
63
|
dcicutils/scripts/update_portal_object.py,sha256=9_ZpfKwIJUDbyEI0Xqu_9keMxTIVZ_CyxX8WeGrFI14,24376
|
64
|
-
dcicutils/scripts/view_portal_object.py,sha256=
|
64
|
+
dcicutils/scripts/view_portal_object.py,sha256=lcgXWH9ooVf7tJDIRnoFGOgT0wYLGhiJlJW3a9w6A_c,36983
|
65
65
|
dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19745
|
66
66
|
dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
|
67
67
|
dcicutils/snapshot_utils.py,sha256=YDeI3vD-MhAtHwKDzfEm2q-n3l-da2yRpRR3xp0Ah1M,23021
|
@@ -75,8 +75,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
|
75
75
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
76
76
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
77
77
|
dcicutils/zip_utils.py,sha256=_Y9EmL3D2dUZhxucxHvrtmmlbZmK4FpSsHEb7rGSJLU,3265
|
78
|
-
dcicutils-8.14.0.
|
79
|
-
dcicutils-8.14.0.
|
80
|
-
dcicutils-8.14.0.
|
81
|
-
dcicutils-8.14.0.
|
82
|
-
dcicutils-8.14.0.
|
78
|
+
dcicutils-8.14.0.1b9.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
79
|
+
dcicutils-8.14.0.1b9.dist-info/METADATA,sha256=6dzBhVwY1DNx4-lCS_3FSaztYt-JC8bNFU9o8VoyycA,3439
|
80
|
+
dcicutils-8.14.0.1b9.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
81
|
+
dcicutils-8.14.0.1b9.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
|
82
|
+
dcicutils-8.14.0.1b9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|