Skip to content

Commit a647886

Browse files
committed
note two bugs observed but not triaged
1 parent ce412c5 commit a647886

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/pyff/builtins.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,6 +1524,7 @@ def finalize(req, *opts):
15241524
dt = now + offset
15251525
e.set('validUntil', datetime2iso(dt))
15261526
elif valid_until is not None:
1527+
# TODO: if validUntil was not present, valid_until will be the string 'None' here - never the literal None
15271528
try:
15281529
dt = iso2datetime(valid_until)
15291530
offset = dt - now
@@ -1533,6 +1534,7 @@ def finalize(req, *opts):
15331534

15341535
# set a reasonable default: 50% of the validity
15351536
# we replace this below if we have cacheDuration set
1537+
# TODO: offset can be None here, if validUntil is not a valid duration or ISO date
15361538
req.state['cache'] = int(total_seconds(offset) / 50)
15371539

15381540
cache_duration = req.args.get('cacheDuration', e.get('cacheDuration', None))

0 commit comments

Comments
 (0)