elody 0.0.191__py3-none-any.whl → 0.0.192__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.
- elody/object_configurations/base_object_configuration.py +2 -0
- elody/object_configurations/elody_configuration.py +15 -12
- {elody-0.0.191.dist-info → elody-0.0.192.dist-info}/METADATA +1 -1
- {elody-0.0.191.dist-info → elody-0.0.192.dist-info}/RECORD +7 -7
- {elody-0.0.191.dist-info → elody-0.0.192.dist-info}/WHEEL +1 -1
- {elody-0.0.191.dist-info → elody-0.0.192.dist-info}/licenses/LICENSE +0 -0
- {elody-0.0.191.dist-info → elody-0.0.192.dist-info}/top_level.txt +0 -0
|
@@ -103,6 +103,8 @@ class BaseObjectConfiguration(ABC):
|
|
|
103
103
|
)
|
|
104
104
|
if sanitized_value:
|
|
105
105
|
sanitized_document[key] = sanitized_value
|
|
106
|
+
elif isinstance(value, list):
|
|
107
|
+
sanitized_document[key] = [element for element in value if element]
|
|
106
108
|
elif value:
|
|
107
109
|
sanitized_document[key] = value
|
|
108
110
|
return sanitized_document
|
|
@@ -45,10 +45,10 @@ class ElodyConfiguration(BaseObjectConfiguration):
|
|
|
45
45
|
flat_post_body={},
|
|
46
46
|
document_defaults={},
|
|
47
47
|
):
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
flat_post_body = flat_post_body or flatten_dict(
|
|
49
|
+
self.document_info()["object_lists"],
|
|
50
|
+
post_body if isinstance(post_body, dict) else {},
|
|
51
|
+
)
|
|
52
52
|
_id = document_defaults.get("_id", str(uuid4()))
|
|
53
53
|
|
|
54
54
|
identifiers = []
|
|
@@ -66,14 +66,17 @@ class ElodyConfiguration(BaseObjectConfiguration):
|
|
|
66
66
|
"schema": {"type": self.SCHEMA_TYPE, "version": self.SCHEMA_VERSION},
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
69
|
+
if isinstance(post_body, dict):
|
|
70
|
+
for key, object_list_key in self.document_info()["object_lists"].items():
|
|
71
|
+
if not key.startswith("lookup.virtual_relations"):
|
|
72
|
+
post_body[key] = self._merge_object_lists(
|
|
73
|
+
document_defaults.get(key, []),
|
|
74
|
+
post_body.get(key, []),
|
|
75
|
+
object_list_key,
|
|
76
|
+
)
|
|
77
|
+
document = {**template, **document_defaults, **post_body}
|
|
78
|
+
else:
|
|
79
|
+
document = {**template, **document_defaults}
|
|
77
80
|
document = self._pre_crud_hook(crud="create", document=document)
|
|
78
81
|
return document
|
|
79
82
|
|
|
@@ -12,8 +12,8 @@ elody/validator.py,sha256=G7Ya538EJHCFzOxEri2OcFMabfLBCtTKxuf4os_KuNw,260
|
|
|
12
12
|
elody/migration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
elody/migration/base_object_migrator.py,sha256=n8uvgGfjEUy60G47RD7Y-oxp1vHLOauwPMDl87LcxtU,436
|
|
14
14
|
elody/object_configurations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
elody/object_configurations/base_object_configuration.py,sha256=
|
|
16
|
-
elody/object_configurations/elody_configuration.py,sha256=
|
|
15
|
+
elody/object_configurations/base_object_configuration.py,sha256=wRlORb3wyWPPbcJEImd9S3MIVRLLMT96Wh-sXX4h95Q,6882
|
|
16
|
+
elody/object_configurations/elody_configuration.py,sha256=b-x9oBG2FEqSeW2VeCtog7T4KfrXTa_Z_sd9Cjc-330,6523
|
|
17
17
|
elody/object_configurations/job_configuration.py,sha256=HMDxaRUyfqhIy0q3yQDDMH9uW5iCd7VCmqknQofXNt0,2039
|
|
18
18
|
elody/policies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
elody/policies/helpers.py,sha256=AV3wtvthJafW6ueEYGxggB5kk5knWTWzh3zq29Y1-ws,1434
|
|
@@ -35,13 +35,13 @@ elody/policies/authorization/mediafile_derivatives_policy.py,sha256=0JHg0gsj7pdH
|
|
|
35
35
|
elody/policies/authorization/mediafile_download_policy.py,sha256=I9j-w_CrfC1vJ9AqJetKQW9ebs0zur-Wfshrb_cN8vU,2535
|
|
36
36
|
elody/policies/authorization/multi_tenant_policy.py,sha256=SA9H7SBjzuh8mY3gYN7pDG8TV7hdI3GEUtNeiZeNL3M,3164
|
|
37
37
|
elody/policies/authorization/tenant_request_policy.py,sha256=dEgblwRAqwWVcE-O7Jn8hVL3OnwDlQhDEOcPlcElBrk,1185
|
|
38
|
-
elody-0.0.
|
|
38
|
+
elody-0.0.192.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
39
39
|
tests/__init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
40
|
tests/data.py,sha256=Q3oxduf-E3m-Z5G_p3fcs8jVy6g10I7zXKL1m94UVMI,2906
|
|
41
41
|
tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
42
|
tests/unit/test_csv.py,sha256=NQaOhehfQ4GuXku0Y1SA8DYjJeqqidbF50zEHAi8RZA,15923
|
|
43
43
|
tests/unit/test_utils.py,sha256=g63szcEZyHhCOtrW4BnNbcgVca3oYPIOLjBdIzNwwN0,8784
|
|
44
|
-
elody-0.0.
|
|
45
|
-
elody-0.0.
|
|
46
|
-
elody-0.0.
|
|
47
|
-
elody-0.0.
|
|
44
|
+
elody-0.0.192.dist-info/METADATA,sha256=X_ykySrTTSiKwVWKK0iZyVo7IV-4tWTXpjg2CH8vOl0,23358
|
|
45
|
+
elody-0.0.192.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
46
|
+
elody-0.0.192.dist-info/top_level.txt,sha256=E0mImupLj0KmtUUCXRYEoLDRaSkuiGaOIIseAa0oQ-M,21
|
|
47
|
+
elody-0.0.192.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|