Skip to content

Commit

Permalink
v9.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronny Vedrilla committed Oct 27, 2023
1 parent b9f7ef2 commit dbe9ebb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ambient_toolbox/tests/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ def get_request(
request = factory.get(url)

# Set user object if it is of a valid type
if isinstance(user, Union[AbstractBaseUser, AnonymousUser]) or user is None:
# todo remove noqa when we drop older python support
if user is None or isinstance(user, AbstractBaseUser) or isinstance(user, AnonymousUser): # noqa: PLR1701
request.user = user
else:
raise ValueError(_('Please pass a user object to RequestProviderMixin.'))
Expand Down

0 comments on commit dbe9ebb

Please sign in to comment.