1. OpenREM
  2. OpenREM
  3. OpenREM
  4. Issues

Issues

Issue #123 resolved

Exports fail for @dplatten

Ed McDonagh
created an issue

Exports are failing on the line

e = e.filter(**{f[filt].name + '__' + f[filt].lookup_type : filterdict[filt]})

Doesn't matter which filters, as long as there are some.

Comments (17)

  1. Ed McDonagh reporter

    Testing shows that there seems to be a list coming through, which then trips up filterdict[filt]

    There may also be some empty values.

    Proposed fix from David Platten

        for filt in f:
            if filt in filterdict and filterdict[filt]:
                if (filterdict[filt])[0] <> '':
                    e = e.filter(**{f[filt].name + '__' + f[filt].lookup_type : (filterdict[filt])[0]})
    
  2. Ed McDonagh reporter

    Merge message should have said (forgot --no-ff): Additional code added to filter code to check for lists. Tested with CT xlsx on Ubuntu and David Platten's Windows install, tested csv mg, fluoro and CT on Ubuntu and csv nhsbsp on Ubuntu. Fixes #123.

  3. Log in to comment