-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(profile) add check for getting profile if it exists
This commit adds a check if the profile one is trying to get exists. Adds ProfileDoesNotExist class to raise exception if it does not exist. It also removes update function from ProfileRetrieveView because it was not being used anywhere. Also adds test for this check [Delivers #162163267]
- Loading branch information
1 parent
014d6b0
commit e727e0d
Showing
4 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ omit = | |
*/venv/* | ||
*/.vscode/* | ||
*__init__* | ||
*/test/* | ||
|
||
[run] | ||
branch = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from rest_framework.exceptions import APIException | ||
|
||
|
||
class ProfileDoesNotExist(APIException): | ||
status_code = 400 | ||
default_detail = 'Profile does not exist.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters