Skip to content

The conditional check in datatransfer does not validate whether the required transfer_id is set #228

Closed
@rasmunk

Description

@rasmunk

When the transfer_map is loaded in datatransfer.py via

transfer_dict = transfer_map.get(transfer_id, {})

The subsequent conditional check does not validate whether the transfer_id is actually present in the transfer_map since the following conditional check in both the action == 'deltransfer'

if transfer_dict is None:

and action == 'redotransfer'

if transfer_dict is None:

will never be true since an empty collection's truth value is false.

https://stackoverflow.com/questions/23177439/how-to-check-if-a-dictionary-is-empty
https://docs.python.org/3.8/library/stdtypes.html#truth-value-testing

Might be a leftover from python2

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions