File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
api/src/Vote.Monitor.Hangfire/Jobs/Export/FormSubmissions Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ ORDER BY
227227 FROM
228228 "Attachments" A
229229 WHERE
230- A."ElectionRoundId " = @ELECTIONROUNDID
230+ A."MonitoringObserverId " = FS."MonitoringObserverId"
231231 AND (
232232 (A."FormId" = FS."FormId" AND FS."PollingStationId" = A."PollingStationId") -- backwards compatibility
233233 OR A."SubmissionId" = FS."Id"
@@ -244,10 +244,11 @@ ORDER BY
244244 FROM
245245 "Notes" N
246246 WHERE
247- N."ElectionRoundId" = @ELECTIONROUNDID
248- AND N."FormId" = FS."FormId"
249- AND N."MonitoringObserverId" = FS."MonitoringObserverId"
250- AND FS."PollingStationId" = N."PollingStationId"
247+ N."MonitoringObserverId" = FS."MonitoringObserverId"
248+ AND (
249+ (N."FormId" = FS."FormId" AND FS."PollingStationId" = N."PollingStationId") -- backwards compatibility
250+ OR N."SubmissionId" = FS."Id"
251+ )
251252 ),
252253 '[]'::JSONB
253254 ) AS "Notes",
You can’t perform that action at this time.
0 commit comments