elody 0.0.187__py3-none-any.whl → 0.0.189__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/csv.py +4 -3
- elody/policies/permission_handler.py +2 -6
- {elody-0.0.187.dist-info → elody-0.0.189.dist-info}/METADATA +3 -2
- {elody-0.0.187.dist-info → elody-0.0.189.dist-info}/RECORD +7 -7
- {elody-0.0.187.dist-info → elody-0.0.189.dist-info}/WHEEL +1 -1
- {elody-0.0.187.dist-info → elody-0.0.189.dist-info/licenses}/LICENSE +0 -0
- {elody-0.0.187.dist-info → elody-0.0.189.dist-info}/top_level.txt +0 -0
elody/csv.py
CHANGED
|
@@ -270,6 +270,7 @@ class CSVMultiObject(CSVParser):
|
|
|
270
270
|
for key, value in row.items():
|
|
271
271
|
if not value:
|
|
272
272
|
continue
|
|
273
|
+
original_value = value
|
|
273
274
|
if key != identifying_column:
|
|
274
275
|
value = value.lower()
|
|
275
276
|
if key == "file_source":
|
|
@@ -301,7 +302,7 @@ class CSVMultiObject(CSVParser):
|
|
|
301
302
|
elif key in self.top_level_fields and self.__field_allowed(
|
|
302
303
|
type, key, value
|
|
303
304
|
):
|
|
304
|
-
indexed_dict[type][id][key] =
|
|
305
|
+
indexed_dict[type][id][key] = original_value
|
|
305
306
|
elif (
|
|
306
307
|
key not in self.index_mapping.values()
|
|
307
308
|
or self.include_indexed_field
|
|
@@ -312,7 +313,7 @@ class CSVMultiObject(CSVParser):
|
|
|
312
313
|
indexed_dict[type][id].setdefault("metadata", list())
|
|
313
314
|
options = metadata_info.get("value_options")
|
|
314
315
|
if self.is_datetime(value):
|
|
315
|
-
|
|
316
|
+
original_value = self.parse_datetime(value)
|
|
316
317
|
if options and value not in options:
|
|
317
318
|
if "invalid_value" not in self.get_errors():
|
|
318
319
|
self.set_error("invalid_value", list())
|
|
@@ -320,7 +321,7 @@ class CSVMultiObject(CSVParser):
|
|
|
320
321
|
self.get_errors()["invalid_value"].append(message)
|
|
321
322
|
|
|
322
323
|
indexed_dict[type][id]["metadata"].append(
|
|
323
|
-
self._get_metadata_object(metadata_key,
|
|
324
|
+
self._get_metadata_object(metadata_key, original_value, lang)
|
|
324
325
|
)
|
|
325
326
|
self.__validate_indexed_dict(indexed_dict)
|
|
326
327
|
self.__add_required_fields(indexed_dict)
|
|
@@ -210,20 +210,16 @@ def __is_allowed_to_crud_item_keys(
|
|
|
210
210
|
)
|
|
211
211
|
if element:
|
|
212
212
|
item_in_storage_format[info["key"]].remove(element)
|
|
213
|
-
if key_to_check and key_to_check == restricted_key:
|
|
214
|
-
user_context.bag["restricted_keys"].append(
|
|
215
|
-
restricted_key
|
|
216
|
-
)
|
|
217
213
|
break
|
|
218
214
|
else:
|
|
219
215
|
try:
|
|
220
216
|
del item_in_storage_format[keys_info[0]["key"]][
|
|
221
217
|
keys_info[1]["key"]
|
|
222
218
|
]
|
|
223
|
-
if key_to_check and key_to_check == restricted_key:
|
|
224
|
-
user_context.bag["restricted_keys"].append(restricted_key)
|
|
225
219
|
except KeyError:
|
|
226
220
|
pass
|
|
221
|
+
if key_to_check and key_to_check == restricted_key:
|
|
222
|
+
user_context.bag["restricted_keys"].append(restricted_key)
|
|
227
223
|
else:
|
|
228
224
|
if flat_request_body.get(restricted_key):
|
|
229
225
|
user_context.bag["restricted_keys"].append(restricted_key)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: elody
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.189
|
|
4
4
|
Summary: elody SDK for Python
|
|
5
5
|
Author-email: Inuits <developers@inuits.eu>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -369,6 +369,7 @@ Requires-Dist: six>=1.16.0; extra == "loader"
|
|
|
369
369
|
Requires-Dist: tzlocal>=5.2; extra == "loader"
|
|
370
370
|
Provides-Extra: util
|
|
371
371
|
Requires-Dist: cloudevents>=1.9.0; extra == "util"
|
|
372
|
+
Dynamic: license-file
|
|
372
373
|
|
|
373
374
|
# elody SDK for Python
|
|
374
375
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
elody/__init__.py,sha256=d0Q6Fn44e7wFfLabDOBxpcJ1DPKWlFunGYDUBmO-4hA,22
|
|
3
3
|
elody/client.py,sha256=VFjUUaE9edtK1XuAF5T3ayem2UEBr-Anww8AhITYLdI,8575
|
|
4
|
-
elody/csv.py,sha256=
|
|
4
|
+
elody/csv.py,sha256=Q6B95wkz9WioLaVejdjX9n9zygceRSDObyLGL50HZ1Y,15981
|
|
5
5
|
elody/error_codes.py,sha256=Derbr10Lb3HZcePjargz_XsYnw2SC0edD5KHZeKlp1s,4227
|
|
6
6
|
elody/exceptions.py,sha256=5KSw2sPCZz3lDIJX4LiR2iL9n4m4KIil04D1d3X5rd0,968
|
|
7
7
|
elody/job.py,sha256=3_heLwfNrWYcjIMKPG-vWsQayAAI7tyLFUUC_b1rT7w,4264
|
|
@@ -17,7 +17,7 @@ elody/object_configurations/elody_configuration.py,sha256=8r2mlGBiaNF3tUET86faAa
|
|
|
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
|
|
20
|
-
elody/policies/permission_handler.py,sha256=
|
|
20
|
+
elody/policies/permission_handler.py,sha256=C5wwgAplxmrkrseA-oNjX_Ff1PfVGP5NIvpx0F5PYho,9869
|
|
21
21
|
elody/policies/tenant_id_resolver.py,sha256=BIl6lr9AH6Q_aZSsxF24B7ramkIZH-R-8bpLrTvYLtM,13796
|
|
22
22
|
elody/policies/authentication/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
elody/policies/authentication/base_user_tenant_validation_policy.py,sha256=fxvrB4iG6fehBh6b4XS8AWewtNsCABgSooma5ljjZk4,5144
|
|
@@ -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.189.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
38
39
|
tests/__init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
40
|
tests/data.py,sha256=Q3oxduf-E3m-Z5G_p3fcs8jVy6g10I7zXKL1m94UVMI,2906
|
|
40
41
|
tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
42
|
tests/unit/test_csv.py,sha256=NQaOhehfQ4GuXku0Y1SA8DYjJeqqidbF50zEHAi8RZA,15923
|
|
42
43
|
tests/unit/test_utils.py,sha256=g63szcEZyHhCOtrW4BnNbcgVca3oYPIOLjBdIzNwwN0,8784
|
|
43
|
-
elody-0.0.
|
|
44
|
-
elody-0.0.
|
|
45
|
-
elody-0.0.
|
|
46
|
-
elody-0.0.
|
|
47
|
-
elody-0.0.187.dist-info/RECORD,,
|
|
44
|
+
elody-0.0.189.dist-info/METADATA,sha256=OtdEyj5zozMkuuQSxtodwqs_TeHiPGCLADnN05UF67Y,23358
|
|
45
|
+
elody-0.0.189.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
46
|
+
elody-0.0.189.dist-info/top_level.txt,sha256=E0mImupLj0KmtUUCXRYEoLDRaSkuiGaOIIseAa0oQ-M,21
|
|
47
|
+
elody-0.0.189.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|