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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: clear-skies
3
- Version: 1.19.3
3
+ Version: 1.19.4
4
4
  Summary: A framework for building backends in the cloud
5
5
  Home-page: https://github.com/cmancone/clearskies
6
6
  License: MIT
@@ -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=GHXlhXiuewu9E54RsCo7BPyFXQ7m5tCyiAPHIgb8Qok,6820
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.3.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
196
- clear_skies-1.19.3.dist-info/METADATA,sha256=9dz5yLEfSIw3_-cJQu8KsIzD4qHdZk8zCPxXUucAQH8,1366
197
- clear_skies-1.19.3.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
198
- clear_skies-1.19.3.dist-info/RECORD,,
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,,
@@ -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 fetch_model(self, input_output):
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
- id = routing_data[self.id_column_name]
32
- elif "id" in routing_data:
33
- id = routing_data["id"]
34
- else:
35
- raise ValueError("I didn't receive the ID in my routing data. I am probably misconfigured.")
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: