Yes, sorry. I previously did try similar to this. [f for f in fields] would
print None. But " None or '' " prints "" (empty string) correctly. Thanks


On Tue, Jul 9, 2013 at 3:55 PM, Simon Kelly <notifications@github.com>wrote:

> In corehq/apps/fixtures/views.py:
>
> >              data_row = tuple([str(_id_from_doc(item_row)),"N"]+
> > -                             [item_row.fields[field] for field in fields]+
> > +                             ["" if item_row.fields[field] is None else item_row.fields[field] for field in fields]+
>
> Try this in a python shell:
>
> >>> fields = ['a', None, 'b']>>> row = [f or '' for f in fields]>>> row['a', '', 'b']
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dimagi/commcare-hq/pull/578/files#r5086732>
> .
>