Skip to content

Commit

Permalink
Remove assert statement from non-test files (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] committed Oct 10, 2022
1 parent 21f2da2 commit 6e2f2bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion durin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ class APIAccessTokenView(APIView):
def client_name(self) -> str:
client_name = getattr(durin_settings, "API_ACCESS_CLIENT_NAME", None)
# verify/ asssert
assert client_name, "setting `API_ACCESS_CLIENT_NAME` must be set to use this."
if not client_name:
raise AssertionError(
"setting `API_ACCESS_CLIENT_NAME` must be set to use this."
)
return client_name

def get_serializer(self, *args, **kwargs):
Expand Down

0 comments on commit 6e2f2bc

Please sign in to comment.