clear-skies 1.19.2__py3-none-any.whl → 1.19.4__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.19.2.dist-info → clear_skies-1.19.4.dist-info}/METADATA +1 -1
- {clear_skies-1.19.2.dist-info → clear_skies-1.19.4.dist-info}/RECORD +6 -6
- clearskies/handlers/get.py +8 -6
- clearskies/handlers/simple_routing_route.py +2 -2
- {clear_skies-1.19.2.dist-info → clear_skies-1.19.4.dist-info}/LICENSE +0 -0
- {clear_skies-1.19.2.dist-info → clear_skies-1.19.4.dist-info}/WHEEL +0 -0
|
@@ -138,7 +138,7 @@ clearskies/handlers/exceptions/authorization.py,sha256=14JuU5zLEf2sv82VNxsJt7dGS
|
|
|
138
138
|
clearskies/handlers/exceptions/client_error.py,sha256=o1OGnjlXT5zZ1Vb2LTRPYIio0YAnXPpXDGuqSLQP9_Y,39
|
|
139
139
|
clearskies/handlers/exceptions/input_error.py,sha256=kmEVv9LNIalLKD9GF-olsD39Z94abHGkB54NskOG6g4,136
|
|
140
140
|
clearskies/handlers/exceptions/not_found.py,sha256=xThOXiMfyYBaI2bhfOhpVoZ_vdw1hU8A_HxHenPqHzo,96
|
|
141
|
-
clearskies/handlers/get.py,sha256=
|
|
141
|
+
clearskies/handlers/get.py,sha256=x9SogDd2ZvIYwv2UkNa_FUmmKMNd9XPadkbnBKbyTGo,6892
|
|
142
142
|
clearskies/handlers/health_check.py,sha256=m6H3psUql-I7hZao3fsxjrZnCjFJZ1ROTF-41g8Syww,2078
|
|
143
143
|
clearskies/handlers/input_processing.py,sha256=edtG6NQJZCte0Nq-j7SUMzp6vxgIIbLxeUGscWOALAs,3814
|
|
144
144
|
clearskies/handlers/list.py,sha256=Liil791oF9-NjofRV40bNVbhbzF4sM74_efvoDHenqg,25384
|
|
@@ -148,7 +148,7 @@ clearskies/handlers/restful_api.py,sha256=1rJ2REX1sTAdbqaRuCclP375agrho4zNNQx6hX
|
|
|
148
148
|
clearskies/handlers/routing.py,sha256=uWKWcEaiHVqfDebPkQVuG9AS8pOixW31wW0yIQ-25Aw,3079
|
|
149
149
|
clearskies/handlers/schema_helper.py,sha256=62644USvFlZu_6tT7rb-k6t_5J3Q0uZsJwP5KREk_WM,4961
|
|
150
150
|
clearskies/handlers/simple_routing.py,sha256=KpOSQK2_tTwrPblDmxAUpX-Fqts_Or_MLWGKOOkJnoo,9403
|
|
151
|
-
clearskies/handlers/simple_routing_route.py,sha256=
|
|
151
|
+
clearskies/handlers/simple_routing_route.py,sha256=3U3dixEKuf-Xo88RQGH_grm1x79-px6idt1-xaLUSiY,8953
|
|
152
152
|
clearskies/handlers/simple_search.py,sha256=bSfq8rzdqkBj-dTGUBSZ1EkfjzUWHID7mKD2xEf8VzQ,6165
|
|
153
153
|
clearskies/handlers/update.py,sha256=VCZkoID7i5VHq78fkIpjbRdXQ4Z3IuXEE5dfC8z4RZI,4088
|
|
154
154
|
clearskies/handlers/write.py,sha256=VduGtjnFMQOvo3l0t-tUP4PExPJ9JEpuziHsquF08rE,9344
|
|
@@ -192,7 +192,7 @@ clearskies/tests/simple_api/models/__init__.py,sha256=nUA0W6fgXw_Bxa9CudkaDkC80t
|
|
|
192
192
|
clearskies/tests/simple_api/models/status.py,sha256=PEhPbaQh5qdUNHp8O0gz91LOLENAEBtqSaHxUPXchaM,699
|
|
193
193
|
clearskies/tests/simple_api/models/user.py,sha256=5_P4Tp1tTdX7PkMJ__epPM5MA7JAeVYGas69vcWloLc,819
|
|
194
194
|
clearskies/tests/simple_api/users_api.py,sha256=KYXCgEofDxHeRdQK67txN5oYUPvxxmB8JTku7L-apk4,2344
|
|
195
|
-
clear_skies-1.19.
|
|
196
|
-
clear_skies-1.19.
|
|
197
|
-
clear_skies-1.19.
|
|
198
|
-
clear_skies-1.19.
|
|
195
|
+
clear_skies-1.19.4.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
|
|
196
|
+
clear_skies-1.19.4.dist-info/METADATA,sha256=ENNaUE9Oz_QG5vluGMK4uK81tcBAVLrwCrQ1BBErEfM,1366
|
|
197
|
+
clear_skies-1.19.4.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
198
|
+
clear_skies-1.19.4.dist-info/RECORD,,
|
clearskies/handlers/get.py
CHANGED
|
@@ -25,14 +25,16 @@ class Get(Base):
|
|
|
25
25
|
return self.error(input_output, model, 404)
|
|
26
26
|
return self.success(input_output, self._model_as_json(model, input_output))
|
|
27
27
|
|
|
28
|
-
def
|
|
28
|
+
def get_model_id(self, input_output):
|
|
29
29
|
routing_data = input_output.routing_data()
|
|
30
30
|
if self.id_column_name in routing_data:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
return routing_data[self.id_column_name]
|
|
32
|
+
if "id" in routing_data:
|
|
33
|
+
return routing_data["id"]
|
|
34
|
+
raise ValueError("I didn't receive the ID in my routing data. I am probably misconfigured.")
|
|
35
|
+
|
|
36
|
+
def fetch_model(self, input_output):
|
|
37
|
+
id = self.get_model_id(input_output)
|
|
36
38
|
models = self._model.where(f"{self.id_column_name}={id}")
|
|
37
39
|
for where in self.configuration("where"):
|
|
38
40
|
if type(where) == str:
|
|
@@ -98,7 +98,7 @@ class SimpleRoutingRoute:
|
|
|
98
98
|
to understand if there was no route match at all.
|
|
99
99
|
"""
|
|
100
100
|
# if we're routing to a simple router then defer to it
|
|
101
|
-
incoming = f"Incoming request: [{request_method}] {full_path}. Check against route with url '{self._path}' "
|
|
101
|
+
incoming = f"Incoming request: [{request_method}] {full_path}. Check against route with url '{self._path}'. Results: "
|
|
102
102
|
if not self._methods:
|
|
103
103
|
incoming += " configured for any method except OPTIONS"
|
|
104
104
|
elif isinstance(self._methods, str):
|
|
@@ -136,7 +136,7 @@ class SimpleRoutingRoute:
|
|
|
136
136
|
return None
|
|
137
137
|
# make sure we don't get confused by partial matches. `user` should match `user/` and `user/5`,
|
|
138
138
|
# but it shouldn't match `users/`
|
|
139
|
-
if full_path_length > my_path_length and full_path[my_path_length] != "/":
|
|
139
|
+
if full_path_length > my_path_length and full_path[my_path_length] != "/" and my_path != "":
|
|
140
140
|
logger.debug(f"{incoming} Not a match. I only partially matched the URL but not as a sub-directory.")
|
|
141
141
|
return None
|
|
142
142
|
logger.debug(f"{incoming} Match!")
|
|
File without changes
|
|
File without changes
|