Verify string lengths when creating model objects
This commit is contained in:
parent
f9686c5306
commit
5d1b5f90ac
2 changed files with 57 additions and 0 deletions
|
|
@ -17,6 +17,7 @@ from sqlservice import ModelBase, as_declarative
|
|||
from pyjeeves import logging
|
||||
|
||||
from . import db
|
||||
from .ext import InstallValidatorListeners
|
||||
|
||||
logger = logging.getLogger("PyJeeves." + __name__)
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ except OperationalError as e:
|
|||
class RawBaseModel(ModelBase):
|
||||
""" Generalize __init__, __repr__ and to_json
|
||||
Based on the models columns , ForetagKod=1"""
|
||||
__sa_instrumentation_manager__ = InstallValidatorListeners
|
||||
|
||||
__to_dict_filter__ = []
|
||||
__to_dict_only__ = ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue