Skip to content

Commit

Permalink
Avoid losing empty list with pdc_client
Browse files Browse the repository at this point in the history
With pdc_client, not only for empty list, but empty dictionary,
it will be lost. Convert it to empty string to avoid this case.

Not sure if it is the right fixing.

JIRA: PDC-948
  • Loading branch information
erichuanggit committed Sep 7, 2015
1 parent 7882dc4 commit a81f9bd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pdc_client/bin/pdc_client
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ if __name__ == "__main__":

data = load_data(options)

for key, value in data.iteritems():
if not value:
# empty string won't be lost
data[key] = ''

try:
client, session = make_client()
except BeanBagException as e:
Expand Down

0 comments on commit a81f9bd

Please sign in to comment.