sera-2 1.20.12__tar.gz → 1.20.13__tar.gz

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.
Files changed (47) hide show
  1. {sera_2-1.20.12 → sera_2-1.20.13}/PKG-INFO +1 -1
  2. {sera_2-1.20.12 → sera_2-1.20.13}/pyproject.toml +1 -1
  3. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/api_helper.py +1 -1
  4. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_datatype.py +13 -0
  5. {sera_2-1.20.12 → sera_2-1.20.13}/README.md +0 -0
  6. {sera_2-1.20.12 → sera_2-1.20.13}/sera/__init__.py +0 -0
  7. {sera_2-1.20.12 → sera_2-1.20.13}/sera/constants.py +0 -0
  8. {sera_2-1.20.12 → sera_2-1.20.13}/sera/exports/__init__.py +0 -0
  9. {sera_2-1.20.12 → sera_2-1.20.13}/sera/exports/schema.py +0 -0
  10. {sera_2-1.20.12 → sera_2-1.20.13}/sera/exports/test.py +0 -0
  11. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/__init__.py +0 -0
  12. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/api_test_helper.py +0 -0
  13. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/base_orm.py +0 -0
  14. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/base_service.py +0 -0
  15. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/__init__.py +0 -0
  16. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/_dcg.py +0 -0
  17. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/_edge.py +0 -0
  18. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/_flow.py +0 -0
  19. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/_fn_signature.py +0 -0
  20. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/_node.py +0 -0
  21. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/_runtime.py +0 -0
  22. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/directed_computing_graph/_type_conversion.py +0 -0
  23. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/middlewares/__init__.py +0 -0
  24. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/middlewares/auth.py +0 -0
  25. {sera_2-1.20.12 → sera_2-1.20.13}/sera/libs/middlewares/uscp.py +0 -0
  26. {sera_2-1.20.12 → sera_2-1.20.13}/sera/make/__init__.py +0 -0
  27. {sera_2-1.20.12 → sera_2-1.20.13}/sera/make/__main__.py +0 -0
  28. {sera_2-1.20.12 → sera_2-1.20.13}/sera/make/make_app.py +0 -0
  29. {sera_2-1.20.12 → sera_2-1.20.13}/sera/make/make_python_api.py +0 -0
  30. {sera_2-1.20.12 → sera_2-1.20.13}/sera/make/make_python_model.py +0 -0
  31. {sera_2-1.20.12 → sera_2-1.20.13}/sera/make/make_python_services.py +0 -0
  32. {sera_2-1.20.12 → sera_2-1.20.13}/sera/make/make_typescript_model.py +0 -0
  33. {sera_2-1.20.12 → sera_2-1.20.13}/sera/misc/__init__.py +0 -0
  34. {sera_2-1.20.12 → sera_2-1.20.13}/sera/misc/_formatter.py +0 -0
  35. {sera_2-1.20.12 → sera_2-1.20.13}/sera/misc/_utils.py +0 -0
  36. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/__init__.py +0 -0
  37. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_class.py +0 -0
  38. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_collection.py +0 -0
  39. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_constraints.py +0 -0
  40. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_default.py +0 -0
  41. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_enum.py +0 -0
  42. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_module.py +0 -0
  43. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_multi_lingual_string.py +0 -0
  44. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_parse.py +0 -0
  45. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_property.py +0 -0
  46. {sera_2-1.20.12 → sera_2-1.20.13}/sera/models/_schema.py +0 -0
  47. {sera_2-1.20.12 → sera_2-1.20.13}/sera/typing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sera-2
3
- Version: 1.20.12
3
+ Version: 1.20.13
4
4
  Summary:
5
5
  Author: Binh Vu
6
6
  Author-email: bvu687@gmail.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "sera-2"
3
- version = "1.20.12"
3
+ version = "1.20.13"
4
4
  description = ""
5
5
  authors = ["Binh Vu <bvu687@gmail.com>"]
6
6
  readme = "README.md"
@@ -91,7 +91,7 @@ def parse_query(
91
91
  v = [norm_func(x) for x in v]
92
92
  else:
93
93
  v = norm_func(v)
94
- except ValueError:
94
+ except (ValueError, KeyError):
95
95
  if debug:
96
96
  raise HTTPException(
97
97
  status_code=status_codes.HTTP_400_BAD_REQUEST,
@@ -78,6 +78,19 @@ class PyTypeWithDep:
78
78
  return ("TypeConversion.to_float", "sera.libs.api_helper.TypeConversion")
79
79
  if self.type == "bool":
80
80
  return ("TypeConversion.to_bool", "sera.libs.api_helper.TypeConversion")
81
+ if any(
82
+ dep.find(".models.enums.") != -1 and dep.endswith(self.type)
83
+ for dep in self.deps
84
+ ):
85
+ # This is an enum type, we directly use the enum constructor as the conversion function
86
+ return (
87
+ self.type,
88
+ [
89
+ dep
90
+ for dep in self.deps
91
+ if dep.find(".models.enums.") != -1 and dep.endswith(self.type)
92
+ ][0],
93
+ )
81
94
  else:
82
95
  raise NotImplementedError()
83
96
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes