File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff 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 ))
You can’t perform that action at this time.
0 commit comments