Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions iota/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,8 @@ def is_promotable(
'info': Optional(List[Text])
If `promotable` is ``False``, this contains info about what
went wrong.
Note that when 'promotable' is ``True``, 'info' does not
exist.

}

Expand Down
3 changes: 2 additions & 1 deletion iota/commands/extended/is_promotable.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ def _execute(self, request):
response['promotable'] = response['promotable'] and is_within

# If there are no problems, we don't need 'info' field
# Delete info field to make it consistent with check_consistency repsonse.
if response['promotable']:
response['info'] = None
del response['info']

return response

Expand Down
1 change: 0 additions & 1 deletion test/commands/extended/is_promotable_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ def test_happy_path(self):

{
'promotable': True,
'info': None,
}
)

Expand Down