Commit ede49c7e authored by Alex Gaynor's avatar Alex Gaynor Committed by Alex Gaynor
Browse files

Fixed #15754 -- avoid recursively computing the tree of media widgets more...

Fixed #15754 -- avoid recursively computing the tree of media widgets more times than is necessary for a wiget
parent ad237fb7
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -110,9 +110,10 @@ class Media(StrAndUnicode):
def media_property(cls):
    def _media(self):
        # Get the media property of the superclass, if it exists
        if hasattr(super(cls, self), 'media'):
            base = super(cls, self).media
        else:
        sup_cls = super(cls, self)
        try:
            base = sup_cls.media
        except AttributeError:
            base = Media()

        # Get the media definition for this class