clear-skies 1.22.23__py3-none-any.whl → 1.22.25__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.
Potentially problematic release.
This version of clear-skies might be problematic. Click here for more details.
- {clear_skies-1.22.23.dist-info → clear_skies-1.22.25.dist-info}/METADATA +1 -1
- {clear_skies-1.22.23.dist-info → clear_skies-1.22.25.dist-info}/RECORD +7 -7
- clearskies/authentication/public.py +1 -1
- clearskies/authentication/secret_bearer.py +1 -1
- clearskies/handlers/update.py +6 -2
- {clear_skies-1.22.23.dist-info → clear_skies-1.22.25.dist-info}/LICENSE +0 -0
- {clear_skies-1.22.23.dist-info → clear_skies-1.22.25.dist-info}/WHEEL +0 -0
|
@@ -7,8 +7,8 @@ clearskies/authentication/authorization.py,sha256=eLzBrXMNr1gYoIBZTd8I6uH3R0CfMM
|
|
|
7
7
|
clearskies/authentication/authorization_pass_through.py,sha256=t8-IrgQtKwBqZFhUS6e9Gg72jF_NAV-R2Xid3-Svdxo,752
|
|
8
8
|
clearskies/authentication/jwks.py,sha256=AOrCkL7pVznTM6mbrQ3RVHCccws0b_yEtqEOe6NRw5k,3368
|
|
9
9
|
clearskies/authentication/jwks_jwcrypto.py,sha256=UBoRVvTo6g3A8RvmXTWpg2lbysqA4mxlrSc6mKppDqw,1737
|
|
10
|
-
clearskies/authentication/public.py,sha256=
|
|
11
|
-
clearskies/authentication/secret_bearer.py,sha256=
|
|
10
|
+
clearskies/authentication/public.py,sha256=H3QGEdkRIHL00_M31EXfbuMkKT8ax5poNmKQIAZev5A,988
|
|
11
|
+
clearskies/authentication/secret_bearer.py,sha256=scp3XOlhFk9G8YzhBOUBNtJzR5lk4psYbhuVcMhTpFQ,3337
|
|
12
12
|
clearskies/autodoc/__init__.py,sha256=JRUAmd0he8iGlgiZvxewLMIXJqnOFEdvlaKAtHpC2lo,124
|
|
13
13
|
clearskies/autodoc/formats/__init__.py,sha256=3rhoLKmEwT6PljaHvOl9qdeMIXyD7PQBZbqZKy5Mb5I,56
|
|
14
14
|
clearskies/autodoc/formats/oai3_json/__init__.py,sha256=O4kkUc9RbqEc5C5wjirGRjfXdD-0yWXUxjC2E-Cit60,142
|
|
@@ -157,7 +157,7 @@ clearskies/handlers/schema_helper.py,sha256=62644USvFlZu_6tT7rb-k6t_5J3Q0uZsJwP5
|
|
|
157
157
|
clearskies/handlers/simple_routing.py,sha256=xMVfBas51pZOP8xvDmeH6L-iO6CGIrICyT5yUYceJOs,9550
|
|
158
158
|
clearskies/handlers/simple_routing_route.py,sha256=vJYksR4UPWpPsMX6DhpBtCj5gyZOIytqZL-O6FKu4_c,9271
|
|
159
159
|
clearskies/handlers/simple_search.py,sha256=bSfq8rzdqkBj-dTGUBSZ1EkfjzUWHID7mKD2xEf8VzQ,6165
|
|
160
|
-
clearskies/handlers/update.py,sha256=
|
|
160
|
+
clearskies/handlers/update.py,sha256=iqVsCp8Xhzeto6OEGgQr8A4ip636M9cEVIzvdO_zmEM,4284
|
|
161
161
|
clearskies/handlers/write.py,sha256=Gu1w1PQ1F7tlqCqALorMRek3UH6IkViPIO195dxPd8k,9372
|
|
162
162
|
clearskies/input_outputs/__init__.py,sha256=mQWL-u41FRTrPGuHe8FhLmcHjAEaUxjFwUf7RgDcbAs,182
|
|
163
163
|
clearskies/input_outputs/cli.py,sha256=ar2TeW-24BdCRbw9JFilZyJlZ2Qg34uwluutKx1XKSA,6694
|
|
@@ -208,7 +208,7 @@ clearskies/tests/simple_api/models/__init__.py,sha256=nUA0W6fgXw_Bxa9CudkaDkC80t
|
|
|
208
208
|
clearskies/tests/simple_api/models/status.py,sha256=PEhPbaQh5qdUNHp8O0gz91LOLENAEBtqSaHxUPXchaM,699
|
|
209
209
|
clearskies/tests/simple_api/models/user.py,sha256=5_P4Tp1tTdX7PkMJ__epPM5MA7JAeVYGas69vcWloLc,819
|
|
210
210
|
clearskies/tests/simple_api/users_api.py,sha256=KYXCgEofDxHeRdQK67txN5oYUPvxxmB8JTku7L-apk4,2344
|
|
211
|
-
clear_skies-1.22.
|
|
212
|
-
clear_skies-1.22.
|
|
213
|
-
clear_skies-1.22.
|
|
214
|
-
clear_skies-1.22.
|
|
211
|
+
clear_skies-1.22.25.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
|
|
212
|
+
clear_skies-1.22.25.dist-info/METADATA,sha256=npujLxw9sA0vXJAuGaLIZ03KmowdcRzVc9xz1PhF0ek,1920
|
|
213
|
+
clear_skies-1.22.25.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
214
|
+
clear_skies-1.22.25.dist-info/RECORD,,
|
clearskies/handlers/update.py
CHANGED
|
@@ -19,6 +19,7 @@ class Update(Write):
|
|
|
19
19
|
"where": [],
|
|
20
20
|
"input_error_callable": None,
|
|
21
21
|
"include_id_in_path": False,
|
|
22
|
+
"upsert": False,
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
def get_model_id(self, input_output, input_data):
|
|
@@ -55,8 +56,11 @@ class Update(Write):
|
|
|
55
56
|
models = authorization.filter_models(models, input_output.get_authorization_data(), input_output)
|
|
56
57
|
model = models.first()
|
|
57
58
|
if not model.exists:
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
if self._configuration.get("upsert"):
|
|
60
|
+
input_data[id_column_name] = model_id
|
|
61
|
+
else:
|
|
62
|
+
return self.error(input_output, "Not Found", 404)
|
|
63
|
+
if model.exists and "id" in input_data:
|
|
60
64
|
del input_data["id"]
|
|
61
65
|
|
|
62
66
|
input_errors = {
|
|
File without changes
|
|
File without changes
|