Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SILKY_PYTHON_PROFILER_FUNC gets a models.Request instance instead of django Request #427

Closed
gavinhodge opened this issue Jul 6, 2020 · 1 comment
Assignees

Comments

@gavinhodge
Copy link

The docs suggest this is possible:

# profile only session has recording enabled.
SILKY_PYTHON_PROFILER_FUNC = lambda request: 'profile_requests' in request.session

But on the django-silk==4.0.1 my function is getting an instance of silk.models.Request which means there's no access to the session, authenticated user, etc.

Is this an unintended regression of the data cleansing in RequestModelFactory?

Gavin.

@nasirhjafri
Copy link
Member

Hi @gavinhodge Thanks for reporting, I've pushed a fix. It will be available in next release.

nasirhjafri added a commit that referenced this issue Aug 21, 2020
#427 Passed WSGI request to SILKY_PYTHON_PROFILER_FUNC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants