diff --git a/pinaxcon/monkey_patch.py b/pinaxcon/monkey_patch.py index dba6fe65..445430c6 100644 --- a/pinaxcon/monkey_patch.py +++ b/pinaxcon/monkey_patch.py @@ -11,7 +11,6 @@ class MonkeyPatchMiddleware(object): def do_monkey_patch(): patch_speaker_profile_form() - fix_sitetree_check_access_500s() patch_stripe_payment_form() # Remove this function from existence @@ -31,25 +30,6 @@ def patch_speaker_profile_form(): fields["accessibility"].widget = widgets.AceMarkdownEditor() -def fix_sitetree_check_access_500s(): - ''' django-sitetree has a bug: https://github.com/idlesign/django-sitetree/pull/167/files - -- it swallows the cause of all 500 errors. This swallows KeyErrors from - the failing function. ''' - - from sitetree.sitetreeapp import SiteTree - - old_check_access = SiteTree.check_access - - @wraps(SiteTree.check_access) - def check_access(self, *a, **k): - try: - return old_check_access(self, *a, **k) - except KeyError: - return False - - SiteTree.check_access = check_access - - def patch_stripe_payment_form(): # noqa: C901 import inspect # Oh no.