Create LatestObservations widget error
Error creating widget LatestObservations (not able to reproduce in BE)
Request:
mutation {
createDashboardWidget(input: {
type: "LatestObservations",
name: "null",
description: "null",
positionX: 3
}) {
dashboardWidget {
_id,
id
}
}
}
Error:
"errors": [
{
"debugMessage": "An exception occurred while executing 'SELECT DISTINCT o0_.id AS id_0, o0_.abundance AS abundance_1, o0_.out_of_method AS out_of_method_2, o0_.comment AS comment_3, o0_.sex AS sex_4, o0_.is_dead AS is_dead_5, o0_.species AS species_6, o0_.row_id AS row_id_7, o0_.created_at AS created_at_8, o0_.modified_at AS modified_at_9, o0_.developmental_stage_id AS developmental_stage_id_10, o0_.section_event_id AS section_event_id_11, o0_.created_by_id AS created_by_id_12, o0_.last_modified_by_id AS last_modified_by_id_13 FROM \"observation\" o0_ LEFT JOIN \"section_event\" s1_ ON o0_.section_event_id = s1_.id LEFT JOIN \"section\" s2_ ON s1_.section_id = s2_.id LEFT JOIN \"transect\" t3_ ON s2_.transect_id = t3_.id LEFT JOIN land_coordinator l4_ ON (t3_.icc2 = l4_.icc2) LEFT JOIN \"inspection\" i5_ ON s1_.inspection_id = i5_.id WHERE t3_.status = 1 AND s2_.status = 1 ORDER BY i5_.date_time_from DESC LIMIT 10':\n\nSQLSTATE[42P10]: Invalid column reference: 7 ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list\nLINE 1: ... WHERE t3_.status = 1 AND s2_.status = 1 ORDER BY i5_.date_t...\n ^",
"message": "Internal server error",
"extensions": {
"category": "internal"
},
"locations": [
{
"line": 2,
"column": 13