X-Git-Url: https://plomlompom.com/repos//%22https:/validator.w3.org/check?a=blobdiff_plain;f=plomtask%2Fdays.py;h=17bb46329760beb078a6497d68bd7b0a39a05e3e;hb=b16ae56b9c1a5bb799594fdd759a400d40488350;hp=02ad1a8f5223e1dbaee1ef445fd4e9b211ad4842;hpb=9c3ba57169fdc71d3ffefd4c7c20cae4e89f9c9c;p=plomtask diff --git a/plomtask/days.py b/plomtask/days.py index 02ad1a8..17bb463 100644 --- a/plomtask/days.py +++ b/plomtask/days.py @@ -25,10 +25,9 @@ class Day: if not self.datetime: raise HandledException(f'Given date of wrong format: {self.date}') - @classmethod - def add(cls, db_conn: DatabaseConnection, date: str): - """Add (or re-write) new Day(date) to database.""" - db_conn.exec('REPLACE INTO days VALUES (?)', (date,)) + def save(self, db_conn: DatabaseConnection): + """Add (or re-write) self to database.""" + db_conn.exec('REPLACE INTO days VALUES (?)', (self.date,)) @classmethod def from_table_row(cls, row: Row):