-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
Hi,
When I try to post a JSON payload via my endpoint /network, I get the following error.
TypeError: '_updated' is an invalid keyword argument for Network
I would assume that inserting into the DB via POST should be fairly trivial without requiring anything else.
Am I missing any additional configuration at all?
Eve v0.7.10
Eve-SQLAlchemy v0.7.1
Flask:0.12
Werkzeug: 0.11.15
Thanks!
Full error message is here: https://gist.github.com/virtualvinodh/ced063f382a2cd1c397cee28f736b9ea
Base = declarative_base()
metadata = Base.metadata
class Network(Base):
__tablename__ = 'network'
__table_args__ = {'comment': 'Networks group.'}
network_id = Column(NUMBER(22, 0, False), primary_key=True, comment='Network identity')
name = Column(VARCHAR(50), comment='Network name')
created_date = Column(DateTime, server_default=text("SYSDATE"), comment='Internal / log field. Timestamp of creation')
created_by = Column(VARCHAR(40), nullable=False, server_default=text("'admin' "), comment='Internal / log field. Username who created the object')
SETTINGS = {
'DEBUG': True,
'RESOURCE_METHODS': ['GET', 'POST'],
'SQLALCHEMY_DATABASE_URI': oracle_connection_string,
'SQLALCHEMY_ECHO': True,
'SQLALCHEMY_RECORD_QUERIES': True,
'SQLALCHEMY_TRACK_MODIFICATIONS': False,
'DOMAIN': DomainConfig({
'network': ResourceConfig(Network)
}).render()
}
app = Eve(auth=None, settings=SETTINGS, validator=ValidatorSQL, data=SQL)
db = app.data.driver
Base.metadata.bind = db.engine
db.Model = Base
app.run(debug=True)
Metadata
Metadata
Assignees
Labels
No labels