mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -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):
|
||||
error_path = None
|
||||
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:
|
||||
return error_path
|
||||
|
||||
|
||||
Reference in New Issue
Block a user