-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2244 from uktrade/uat
PROD Release
- Loading branch information
Showing
10 changed files
with
23 additions
and
738 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 |
---|---|---|
@@ -1,18 +1,10 @@ | ||
from django.http import Http404 | ||
|
||
from api.core.exceptions import NotFoundError | ||
from api.flags.models import Flag, FlaggingRule | ||
from api.flags.models import Flag | ||
|
||
|
||
def get_flag(pk): | ||
try: | ||
return Flag.objects.get(pk=pk) | ||
except Flag.DoesNotExist: | ||
raise Http404 | ||
|
||
|
||
def get_flagging_rule(pk): | ||
try: | ||
return FlaggingRule.objects.get(pk=pk) | ||
except FlaggingRule.DoesNotExist: | ||
raise NotFoundError({"flagging_rule": "Flagging rule not found - " + str(pk)}) |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.