You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In working with PydanticDTO from litestar, realized that columns with secret=True parameter were not being added to Table._meta.secret_columns
Seems like a relatively small change:
# piccolo/table.py# line 85 -> update type from Secret to Column to support any Column type as secret_columnsecret_columns: t.List[Column] =field(default_factory=list)
# line 271 -> update type from Secret to Column any Column type as secret_columnsecret_columns: t.List[Column] = []
# line 311 -> add check for secret paramifisinstance(column, Secret) orcolumn._meta.secret:
secret_columns.append(column)
With new test:
# tests/table/test_metaclass.pydeftest_secret_columns_with_param(self):
""" Make sure TableMeta.secret_columns include columns with `secret=True` """classClassified(Table):
top_secret=Varchar(secret=True)
self.assertEqual(
Classified._meta.secret_columns, [Classified.top_secret]
In working with
PydanticDTO
from litestar, realized that columns withsecret=True
parameter were not being added toTable._meta.secret_columns
Seems like a relatively small change:
With new test:
Changes staged for PR here.
The text was updated successfully, but these errors were encountered: