I was trying to get my local LAVA instance to work with our lab's data base dump. So I had the DB, but not all the media files. LAVA almost works when you do this, but I hit two small issues that prevented me from looking at bundle streams and it their test runs.
I realize this is an edge case, but its handy for when you want to test with a real database, but don't want all the media files. I'm not sure this is the exact way we want to fix this, so rather than do a merge proposal I thought I'd get your thoughts on the patch first.
There were two main issues in the code:
bundle_detail wants to get the "document format" for the media file associated with the bundle. Since the file didn't exist we hit an exception. I added a small check to the get_document_format to handle this by returning "n/a".
bundle_detail and test_run_detail wanted to display the size of media files. This calls a new function content_size which will catch an error if the file doesn't exist and simply return 0.
I'm not sure if this patch is doing to good a job of hiding the fact an error does exist. Maybe we should put a conditional in the template file to display an error when the file doesn't exist also?
-andy