mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Add comment for e.path schema validation fix
Add comment for e.path in schema validation and use popleft()
This commit is contained in:
@@ -45,7 +45,9 @@ def __format_message(e):
|
|||||||
def get_path(e):
|
def get_path(e):
|
||||||
error_path = None
|
error_path = None
|
||||||
try:
|
try:
|
||||||
error_path = e.path[0]
|
error_path = e.path.popleft()
|
||||||
|
# no need to catch IndexError exception explicity as
|
||||||
|
# error_path is None if e.path has no items
|
||||||
finally:
|
finally:
|
||||||
return error_path
|
return error_path
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user