You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works in a standard case, however if GUARDIAN_GET_CONTENT_TYPE is used and the expected content type for the model is not the content type for the model itself, this will fail. My suggestion is to replace this check with:
if ctype != get_content_type(queryset.model):
I'm happy to create a PR for this, but wanted to pose it for feedback first.
The text was updated successfully, but these errors were encountered:
There is an equality check in https://github.com/django-guardian/django-guardian/blob/devel/guardian/shortcuts.py#L533 which fails when
GUARDIAN_GET_CONTENT_TYPE
is set.The check in question is:
This works in a standard case, however if
GUARDIAN_GET_CONTENT_TYPE
is used and the expected content type for the model is not the content type for the model itself, this will fail. My suggestion is to replace this check with:I'm happy to create a PR for this, but wanted to pose it for feedback first.
The text was updated successfully, but these errors were encountered: