Commit 2089ff82 authored by Kristian Tan's avatar Kristian Tan

Fixed constructor naming

parent 2fd29674
......@@ -25,16 +25,14 @@ class DailyUsage(db.Model):
date = db.Column(db.String(80), unique=True, nullable=False)
hours = db.Column(db.Integer, unique=False)
def __init__(self, date_, hours_):
self.date = date_
self.hours = hours_
def __init__(self, date, hours):
self.date = date
self.hours = hours
def __repr__(self):
return '<DailyUsage %r>' % self.id
test = DailyUsage(date="12/11/2019", hours=5)
db.session.add(test)
db.session.commit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment