brilliance-admin 0.43.5__py3-none-any.whl → 0.43.6__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.
@@ -146,18 +146,15 @@ class SQLAlchemyRelatedField(TableField):
146
146
  if record is None:
147
147
  raise FieldError(f'Missing record in serialize context in value: {value}')
148
148
 
149
+ related = getattr(record, self.rel_name, None)
150
+
149
151
  if self.many:
150
- related = getattr(record, self.rel_name, None)
151
152
  if related is None:
152
- msg = f'Many Related field "{self.rel_name}" is missing on record "{record}" (many=True)'
153
- raise FieldError(msg)
154
-
153
+ raise FieldError(f'Many Related field "{self.rel_name}" is missing on record "{record}"')
155
154
  return [{'key': get_pk(obj), 'title': str(obj)} for obj in related]
156
155
 
157
- related = getattr(record, self.rel_name, None)
158
156
  if related is None:
159
- msg = f'Related field "{self.rel_name}" is missing on record "{record}" (many=False)'
160
- raise FieldError(msg)
157
+ return None
161
158
 
162
159
  return {'key': get_pk(related), 'title': str(related)}
163
160
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: brilliance-admin
3
- Version: 0.43.5
3
+ Version: 0.43.6
4
4
  Summary: Simple and lightweight admin panel framework powered by FastAPI and Vue3 Vuetify together.. Some call it heavenly in its brilliance.
5
5
  License-Expression: AGPL-3.0
6
6
  Requires-Python: >=3.10
@@ -19,7 +19,7 @@ brilliance_admin/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
19
19
  brilliance_admin/integrations/sqlalchemy/__init__.py,sha256=tIegMU2eIW_zA-PdblCXCjenHAY4sGBUWKuz97ns4gE,275
20
20
  brilliance_admin/integrations/sqlalchemy/auth.py,sha256=NvOLKeeSJuNTzFhisNO9R3sEmGRS8IQrCwghPrtuzaw,4924
21
21
  brilliance_admin/integrations/sqlalchemy/autocomplete.py,sha256=baRroMwGg35uR5zt-aiQc2-ugX4hpwNf79R6bZH9UX0,1416
22
- brilliance_admin/integrations/sqlalchemy/fields.py,sha256=DmxaxI4IaUgh4mgk_LeP-kSd6cKtBTtilfPcOlYLKjo,9520
22
+ brilliance_admin/integrations/sqlalchemy/fields.py,sha256=YjJhJMoiAQk53J0O1ftWhrp3CFIfYwGzIRnvk7aD6lM,9315
23
23
  brilliance_admin/integrations/sqlalchemy/fields_schema.py,sha256=7WkOrt5dVvrsZppNZEZS8QaQPMSrfcWChwOaOFSRVOg,11419
24
24
  brilliance_admin/integrations/sqlalchemy/table/__init__.py,sha256=g_in2pLTi8UQnT5uNFA8mLW5mxlT84irQ7yVaP_OSS4,605
25
25
  brilliance_admin/integrations/sqlalchemy/table/base.py,sha256=-osqhTvqE7YcBxsAjqIUMWyYk1df04GIDmdvtieTXcg,4885
@@ -67,8 +67,8 @@ brilliance_admin/static/tinymce/plugins/codesample/css/prism.css,sha256=exAdMtHb
67
67
  brilliance_admin/static/tinymce/plugins/customLink/plugin.js,sha256=illBNpnHDkBsLG6wo_jDPF6z7CGnO1MQWUoDwZKy6vQ,5589
68
68
  brilliance_admin/static/tinymce/plugins/customLink/css/link.css,sha256=gh5nvY8Z92hJfCEBPnIm4jIPCcKKbJnab-30oIfX7Hc,56
69
69
  brilliance_admin/templates/index.html,sha256=ZLJ_TKUvBDIo_hYfbW43ov0S_bFrzBF-283XP6BKtDI,1294
70
- brilliance_admin-0.43.5.dist-info/licenses/LICENSE,sha256=PjeDRXGbVLtKul5Xpfco_6CyB6bYGWVVPrO0oubquuM,727
71
- brilliance_admin-0.43.5.dist-info/METADATA,sha256=9XHeRi6ZkN894lYJSjesSnB-3A9CsMwB8DEonYnWLrI,7459
72
- brilliance_admin-0.43.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
- brilliance_admin-0.43.5.dist-info/top_level.txt,sha256=almFFSWrVYieI3i54hYL0fMUaeuIYiazS2Kx4wtK-ns,17
74
- brilliance_admin-0.43.5.dist-info/RECORD,,
70
+ brilliance_admin-0.43.6.dist-info/licenses/LICENSE,sha256=PjeDRXGbVLtKul5Xpfco_6CyB6bYGWVVPrO0oubquuM,727
71
+ brilliance_admin-0.43.6.dist-info/METADATA,sha256=rUACoUjEY-Zumi8JUI_EMVdzpyRix-JdKKvNQ-enI2Y,7459
72
+ brilliance_admin-0.43.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
+ brilliance_admin-0.43.6.dist-info/top_level.txt,sha256=almFFSWrVYieI3i54hYL0fMUaeuIYiazS2Kx4wtK-ns,17
74
+ brilliance_admin-0.43.6.dist-info/RECORD,,