sera-2 1.26.1__py3-none-any.whl → 1.26.2__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.
@@ -140,12 +140,20 @@ class Query(msgspec.Struct):
140
140
  continue
141
141
 
142
142
  # normalize the value based on the field type.
143
- prop = cls.properties[clause.field]
144
- assert isinstance(prop, DataProperty)
145
- if prop.datatype.pytype.is_enum_type():
146
- # skip enum types -- we directly use it as string.
147
- continue
148
- clause.value = FieldTypeValidator.typemap[prop.datatype.pytype.type](
143
+ if clause.field not in cls.properties and clause.field.endswith("_id"):
144
+ # this should be a foreign key field
145
+ prop = cls.properties[clause.field[:-3]]
146
+ assert isinstance(prop, ObjectProperty)
147
+ field_type = prop.target.get_id_property().datatype.pytype.type
148
+ else:
149
+ prop = cls.properties[clause.field]
150
+ assert isinstance(prop, DataProperty)
151
+ if prop.datatype.pytype.is_enum_type():
152
+ # skip enum types -- we directly use it as string.
153
+ continue
154
+ field_type = prop.datatype.pytype.type
155
+
156
+ clause.value = FieldTypeValidator.typemap[field_type](
149
157
  clause.field, clause.value
150
158
  )
151
159
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sera-2
3
- Version: 1.26.1
3
+ Version: 1.26.2
4
4
  Summary:
5
5
  Author: Binh Vu
6
6
  Author-email: bvu687@gmail.com
@@ -19,7 +19,7 @@ sera/libs/directed_computing_graph/_type_conversion.py,sha256=_XGvDidOJVmHS4gqdP
19
19
  sera/libs/middlewares/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  sera/libs/middlewares/auth.py,sha256=r6aix1ZBwxMd1Jv5hMCTB8a_gFOJQ6egvxIrf3DWEOs,2323
21
21
  sera/libs/middlewares/uscp.py,sha256=DRy99nmS3qS5HLjRMIGP0oNUtQIci_a4hL5xQh-lXNY,2322
22
- sera/libs/search_helper.py,sha256=3ADhO6s6iIL3TWuH2zicAm_NmJfIm7wPY0cRQjESx2Y,13779
22
+ sera/libs/search_helper.py,sha256=3ZAEw0QZAgRT-i6GB58wuPJvHTyVxhfILim0avEjGx4,14188
23
23
  sera/make/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  sera/make/__main__.py,sha256=HRfOR53p351h6KblVvYm3DLhDIfEtk6R0kjl78_S_S8,1453
25
25
  sera/make/make_app.py,sha256=dTzpJRPGoCojCdJr1TAzwbaquctwwitrGPxkRm9skpo,6033
@@ -50,6 +50,6 @@ sera/models/_parse.py,sha256=nihBEDni-jKwecSBagd6bupDOuCzGviuoD9u6-rT64Q,13203
50
50
  sera/models/_property.py,sha256=Qo23KZl5OQNbuceygicgC3_Yv5ve1KxiFiMoWq6Ljj0,7758
51
51
  sera/models/_schema.py,sha256=VxJEiqgVvbXgcSUK4UW6JnRcggk4nsooVSE6MyXmfNY,1636
52
52
  sera/typing.py,sha256=7S6Ah-Yfcl8a0xAJ4lxEcguq3rYVM7SBeOiuxyJhC04,1089
53
- sera_2-1.26.1.dist-info/METADATA,sha256=XLnw6mAS7RnqDIy9tIuIEwxn00ZOjrUNH1LKgDPoSaU,987
54
- sera_2-1.26.1.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
55
- sera_2-1.26.1.dist-info/RECORD,,
53
+ sera_2-1.26.2.dist-info/METADATA,sha256=vOrf5maMTAY8NaLVi_mAZEmiWwNWnWkNbAPnsEPz4LE,987
54
+ sera_2-1.26.2.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
55
+ sera_2-1.26.2.dist-info/RECORD,,