Skip to content
Snippets Groups Projects
Forked from ICS Control System Infrastructure / csentry
Source project has a limited visibility.
  • Benjamin Bertrand's avatar
    33294a17
    Clean models definition · 33294a17
    Benjamin Bertrand authored
    Don't ovveride SQLAlchemy __init__ method on db.Model classes.
    
    See http://flask-sqlalchemy.pocoo.org/2.3/quickstart/:
    SQLAlchemy adds an implicit constructor to all model classes which
    accepts keyword arguments for all its columns and relationships. If you
    decide to override the constructor for any reason, make sure to keep
    accepting **kwargs and call the super constructor with those **kwargs to
    preserve this behavior
    33294a17
    History
    Clean models definition
    Benjamin Bertrand authored
    Don't ovveride SQLAlchemy __init__ method on db.Model classes.
    
    See http://flask-sqlalchemy.pocoo.org/2.3/quickstart/:
    SQLAlchemy adds an implicit constructor to all model classes which
    accepts keyword arguments for all its columns and relationships. If you
    decide to override the constructor for any reason, make sure to keep
    accepting **kwargs and call the super constructor with those **kwargs to
    preserve this behavior
Code owners
Assign users and groups as approvers for specific file changes. Learn more.