Exporting studies can fall over if cumulative RDSRs are being imported

Issue #589 resolved
Ed McDonagh created an issue

Attempt to export 'today' with 0.8.0b1 from a modality that produces a new (cumulative) RDSR for each event.

Export stopped with DoesNotExist error on

File "remapp/exports/ct_export.py", line 154, in ctxlsx
    for s in exams.ctradiationdose_set.get().ctirradiationeventdata_set.order_by('id'):


raised unexpected: DoesNotExist('CtRadiationDose matching query does not exist.')

Second attempt at exporting the same query succeeded without error.

Suspect the first attempt was exporting a particular study when it was deleted to be replaced by a later RSDR with more events in.

Comments (10)

  1. Ed McDonagh reporter

    Set error message to be printed in all_data sheet as well as error log. Also fixing error of max_events bing zero that occurred whilst testing ref #589

    → <<cset 98d9242323ff>>

  2. Log in to comment