##// END OF EJS Templates
error-reporting: fix setting call_context on dummy-request available in sentry
super-admin -
r4865:2ecd5d81 default
parent child Browse files
Show More
@@ -460,7 +460,12 b' def attach_context_attributes(context, r'
460 context.rhodecode_user = request.rpc_user
460 context.rhodecode_user = request.rpc_user
461
461
462 # attach the whole call context to the request
462 # attach the whole call context to the request
463 request.call_context = context
463 # use set_call_context method if request has it
464 # sometimes in Celery context requests is "different"
465 if hasattr(request, 'set_call_context'):
466 request.set_call_context(context)
467 else:
468 request.call_context = context
464
469
465
470
466 def get_auth_user(request):
471 def get_auth_user(request):
@@ -616,6 +621,9 b' def bootstrap_request(**kwargs):'
616 def call_context(self):
621 def call_context(self):
617 return self._call_context
622 return self._call_context
618
623
624 def set_call_context(self, new_context):
625 self._call_context = new_context
626
619 class TestDummySession(pyramid.testing.DummySession):
627 class TestDummySession(pyramid.testing.DummySession):
620 def save(*arg, **kw):
628 def save(*arg, **kw):
621 pass
629 pass
General Comments 0
You need to be logged in to leave comments. Login now