finbourne-sdk-utils 0.0.26__py3-none-any.whl → 0.0.27__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.
@@ -199,8 +199,8 @@ def populate_model(
199
199
  identifiers=identifiers,
200
200
  sub_holding_keys=sub_holding_keys,
201
201
  )
202
-
203
-
202
+
203
+
204
204
  @checkargs
205
205
  def set_attributes_recursive(
206
206
  model_object,
@@ -334,15 +334,24 @@ def set_attributes_recursive(
334
334
 
335
335
  # Support for polymorphism, we can identify these `abstract` classes by the existence of the below
336
336
 
337
- """ if getattr(instance, "discriminator"):
338
- discriminator = getattr(instance, getattr(instance, "discriminator"))
337
+ # see the openapi template model.generic.mustache
338
+ # this string must match the template
339
+ if hasattr(instance, "_"+ type(instance).__name__ + "__discriminator_property_name"):
340
+
341
+ discriminatorFieldCamelCase = getattr(instance, "_"+ type(instance).__name__ + "__discriminator_property_name")
339
342
 
340
- actual_class = model_object.discriminator_value_class_map[discriminator]
343
+ discriminator_field = camel_case_to_pep_8(discriminatorFieldCamelCase)
344
+
345
+ class_map = getattr(instance, "_"+ type(instance).__name__ + "__discriminator_value_class_map");
346
+
347
+ class_alias = getattr(instance, discriminator_field )
348
+
349
+ actual_class = class_map[class_alias]
350
+
351
+ return set_attributes_recursive(
352
+ model_object=getattr(lusid.models, actual_class), mapping=mapping, row=row,
353
+ )
341
354
 
342
- return set_attributes_recursive(
343
- model_object=getattr(lusid.models, actual_class), mapping=mapping, row=row,
344
- )
345
- """
346
355
  return instance
347
356
 
348
357
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: finbourne-sdk-utils
3
- Version: 0.0.26
3
+ Version: 0.0.27
4
4
  Summary: Python utilities for LUSID V2 SDK
5
5
  Home-page: https://github.com/finbourne/finbourne-sdk-utils
6
6
  Author: FINBOURNE Technology
@@ -11,7 +11,7 @@ finbourne_sdk_utils/cocoon/properties.py,sha256=wxGZDopWSg_hruCwADYRuWI9ZiXBvG3q
11
11
  finbourne_sdk_utils/cocoon/seed_sample_data.py,sha256=SYvuq08j8BbzE3uQMoTmS-xrNtbJ2IRg6KJ1PBm-uVI,4390
12
12
  finbourne_sdk_utils/cocoon/systemConfiguration.py,sha256=qheX-jVTaKuD34DSJn57RyTu4jlLMyXjkSYGVe8goIM,3284
13
13
  finbourne_sdk_utils/cocoon/transaction_type_upload.py,sha256=xASAzh7ycOzksW--azya-QMtgci48w4phfhyxw7v-gg,4439
14
- finbourne_sdk_utils/cocoon/utilities.py,sha256=Fc5TTLYptFNP6WN9b24xrE_ZgfvrDG6SgvWUsz6nImE,62520
14
+ finbourne_sdk_utils/cocoon/utilities.py,sha256=Hl8YtY1lXpvx2bXVMiWoVUHX0WHC9MhooV7cLE6_qwI,62914
15
15
  finbourne_sdk_utils/cocoon/validator.py,sha256=Cguv5O6FR4y4OtRIFrXLy7oQ_XfjHnBo9PNplYi2y_M,7381
16
16
  finbourne_sdk_utils/cocoon/config/domain_settings.json,sha256=qFcdoiNRLIBD1QNBKwvyfPSUdYLE0DgQfVk_0qH4xcs,3504
17
17
  finbourne_sdk_utils/cocoon/config/seed_sample_data.json,sha256=V7PQoe8x3TIzvnVFoSfynP9dqlo6Z_68lvLlmKxD5xc,1186
@@ -45,8 +45,8 @@ finbourne_sdk_utils/lpt/txn_config.py,sha256=4WIEzypXXuoHdbEDJLl90iZj7dYfV-KaE8d
45
45
  finbourne_sdk_utils/lpt/txn_config_yaml.py,sha256=F5kHG-7l5khJvnaLEndHurgmannCi-Pt3U6MMJRuJ9Y,17717
46
46
  finbourne_sdk_utils/pandas_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  finbourne_sdk_utils/pandas_utils/lusid_pandas.py,sha256=rJENs5lIYEKcwvYaagKc-ei_3sOnbNZT9oFLuO8PU6Y,4900
48
- finbourne_sdk_utils-0.0.26.dist-info/LICENSE,sha256=pT32QD9c76jv4OMjXhZrYpjqlZTuiex52qmKUsLKRQc,1066
49
- finbourne_sdk_utils-0.0.26.dist-info/METADATA,sha256=2af-oExkA3e8WFYGFLI3ZuvOwWYaRKCsdsgl1Bj-tbw,733
50
- finbourne_sdk_utils-0.0.26.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
51
- finbourne_sdk_utils-0.0.26.dist-info/top_level.txt,sha256=DiS6bVuYtHoXKSgWOlYhiXKPVFCJqhdtmQgMCGNZxxY,29
52
- finbourne_sdk_utils-0.0.26.dist-info/RECORD,,
48
+ finbourne_sdk_utils-0.0.27.dist-info/LICENSE,sha256=pT32QD9c76jv4OMjXhZrYpjqlZTuiex52qmKUsLKRQc,1066
49
+ finbourne_sdk_utils-0.0.27.dist-info/METADATA,sha256=5XxAh7aGAL0ySIUGl__ybrz5gB6Oye4yz0MPrUmQeEo,733
50
+ finbourne_sdk_utils-0.0.27.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
51
+ finbourne_sdk_utils-0.0.27.dist-info/top_level.txt,sha256=DiS6bVuYtHoXKSgWOlYhiXKPVFCJqhdtmQgMCGNZxxY,29
52
+ finbourne_sdk_utils-0.0.27.dist-info/RECORD,,