clear-skies 1.19.3__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.3.dist-info → clear_skies-1.19.4.dist-info}/METADATA +1 -1
- {clear_skies-1.19.3.dist-info → clear_skies-1.19.4.dist-info}/RECORD +5 -5
- clearskies/handlers/get.py +8 -6
- {clear_skies-1.19.3.dist-info → clear_skies-1.19.4.dist-info}/LICENSE +0 -0
- {clear_skies-1.19.3.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
|
|
@@ -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:
|
|
File without changes
|
|
File without changes
|