Closed jamalex closed 11 years ago
Nice catch. There are places it gets checked (videodownload, videoscan) before calling those functions, but probably best to push those checks into the actual function, as you say.
I believe it should still delete the files (and the objects), if I remember correctly.
I fixed this recently, and merged to release-0.10. Should be fixed in 0.10.2
When the cache is disabled (
CACHE_TIME = 0
), selecting videos from the topic tree on the Update tab and clicking "Delete selected videos" returns the following error:This seems to be because
invalidate_all_pages_related_to_video
callsfilter(has_cache_key, all_paths)
, andhas_cache_key
callsget_web_cache().has_key
, which throws the error if there's no cache.There are probably other cache functions that also assume the existence of the cache. It might be better to either have
get_web_cache()
return a dummy object with nullop methods, or check for its existence and exit early if there's no cache.This isn't a priority, since caching should always be enabled in production, but would be good to make more robust. (I just happened to have caching disabled because I was testing template changes).