From 7b75e18f04d5e19b1826258685c71fbcf8b15e34 Mon Sep 17 00:00:00 2001 From: DawoudSheraz Date: Tue, 11 Dec 2018 12:43:53 +0500 Subject: [PATCH] Static storage fix test --- openedx/core/storage.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openedx/core/storage.py b/openedx/core/storage.py index b7683ce162..0565d29594 100644 --- a/openedx/core/storage.py +++ b/openedx/core/storage.py @@ -25,6 +25,16 @@ class PipelineForgivingStorage(PipelineCachedStorage): out = name return out + def stored_name(self, name): + try: + out = super(PipelineForgivingStorage, self).stored_name(name) + except ValueError: + # This means that a file could not be found, and normally this would + # cause a fatal error, which seems rather excessive given that + # some packages have missing files in their css all the time. + out = name + return out + class ProductionStorage( PipelineForgivingStorage,