def add_retention(cls, db, path, retention_spec):
with db:
row = db.execute(cls.GET_RETENTION, (path,)).fetchone()
- if not row:
+ if row is None:
raise ValueError(f'No schedule found for {path}')
retention = parse_retention(retention_spec)
if not retention:
def rm_retention(cls, db, path, retention_spec):
with db:
row = db.execute(cls.GET_RETENTION, (path,)).fetchone()
- if not row:
+ if row is None:
raise ValueError(f'No schedule found for {path}')
retention = parse_retention(retention_spec)
current = row['retention']