dcicutils 8.16.2.1b3__py3-none-any.whl → 8.16.2.1b4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dcicutils/portal_utils.py CHANGED
@@ -13,6 +13,7 @@ import requests
13
13
  from requests.models import Response
14
14
  from threading import Thread
15
15
  from typing import Callable, Dict, List, Optional, Tuple, Type, Union
16
+ # from urllib.parse import parse_qs as parse_url_query_string
16
17
  from uuid import uuid4 as uuid
17
18
  from webtest.app import TestApp, TestResponse
18
19
  from wsgiref.simple_server import make_server as wsgi_make_server
@@ -279,6 +280,8 @@ class Portal:
279
280
  limit: Optional[int] = None, offset: Optional[int] = None,
280
281
  field: Optional[str] = None, deleted: bool = False,
281
282
  raise_exception: bool = True) -> Optional[dict]:
283
+ if not isinstance(object_id, str):
284
+ return None
282
285
  if isinstance(raw, bool) and raw:
283
286
  add_on = "frame=raw" + ("&datastore=database" if isinstance(database, bool) and database else "")
284
287
  elif database:
@@ -305,6 +308,13 @@ class Portal:
305
308
  add_on += "&status=deleted"
306
309
  else:
307
310
  add_on += "status=deleted"
311
+ if (question_mark := object_id.find("?")) > 0:
312
+ query_string = object_id[question_mark + 1:]
313
+ object_id = object_id[:question_mark]
314
+ if add_on:
315
+ add_on += f"&{query_string}"
316
+ else:
317
+ add_on += query_string
308
318
  if raise_exception:
309
319
  return get_metadata(obj_id=object_id, vapp=self.vapp, key=self.key, add_on=add_on)
310
320
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dcicutils
3
- Version: 8.16.2.1b3
3
+ Version: 8.16.2.1b4
4
4
  Summary: Utility package for interacting with the 4DN Data Portal and other 4DN resources
5
5
  Home-page: https://github.com/4dn-dcic/utils
6
6
  License: MIT
@@ -49,7 +49,7 @@ dcicutils/misc_utils.py,sha256=xNQtavXS6vw_x9rQNhZEryo9b19oWYg-A8TzjhVDuxg,11594
49
49
  dcicutils/obfuscation_utils.py,sha256=fo2jOmDRC6xWpYX49u80bVNisqRRoPskFNX3ymFAmjw,5963
50
50
  dcicutils/opensearch_utils.py,sha256=V2exmFYW8Xl2_pGFixF4I2Cc549Opwe4PhFi5twC0M8,1017
51
51
  dcicutils/portal_object_utils.py,sha256=Az3n1aL-PQkN5gOFE6ZqC2XkYsqiwKlq7-tZggs1QN4,11062
52
- dcicutils/portal_utils.py,sha256=uMy3AJbs-pbjhR0sHXMZq74U6yZ4tTdWPqZJN871jmk,47117
52
+ dcicutils/portal_utils.py,sha256=ttqcs6wNyfe8T_OcGl_AvGXoVD5KKbhwDop7PC8rOaE,47533
53
53
  dcicutils/progress_bar.py,sha256=R3bWLMYM3Xq9PY7U0JadcFT1m7QmCbrbDp9qs9_Kf_c,19472
54
54
  dcicutils/project_utils.py,sha256=qPdCaFmWUVBJw4rw342iUytwdQC0P-XKpK4mhyIulMM,31250
55
55
  dcicutils/qa_checkers.py,sha256=j0kzo_T5VduKTxgsMTp7xjneyNokumZzI_iz55Y0Jjs,20505
@@ -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.16.2.1b3.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
79
- dcicutils-8.16.2.1b3.dist-info/METADATA,sha256=9p8krTHYyhbGEFTwpohYWGLh_UngjVUbTDx9LMTJEck,3493
80
- dcicutils-8.16.2.1b3.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
81
- dcicutils-8.16.2.1b3.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
82
- dcicutils-8.16.2.1b3.dist-info/RECORD,,
78
+ dcicutils-8.16.2.1b4.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
79
+ dcicutils-8.16.2.1b4.dist-info/METADATA,sha256=aYrIqzp70M24jpcVX85oUjOQcKo2cJd2GS7DFyUkGx0,3493
80
+ dcicutils-8.16.2.1b4.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
81
+ dcicutils-8.16.2.1b4.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
82
+ dcicutils-8.16.2.1b4.dist-info/RECORD,,