Skip to content

Commit

Permalink
Revert "fix: GIS API should return geometry (#3195)"
Browse files Browse the repository at this point in the history
This reverts commit 8f66334.
  • Loading branch information
jessicamcinchak authored Jul 15, 2024
1 parent 5dd7744 commit 4b12599
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api.planx.uk/modules/gis/service/digitalLand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type {
} from "@opensystemslab/planx-core/types";
import { gql } from "graphql-request";
import fetch from "isomorphic-fetch";
import { addDesignatedVariable } from "./helpers";
import { addDesignatedVariable, omitGeometry } from "./helpers";
import { baseSchema } from "./local_authorities/metadata/base";
import { $api } from "../../../client";

Expand Down Expand Up @@ -119,14 +119,14 @@ async function go(
);
// because there can be many digital land datasets per planx variable, check if this key is already in our result
if (key && Object.keys(formattedResult).includes(key)) {
formattedResult[key]["data"]?.push(entity);
formattedResult[key]["data"]?.push(omitGeometry(entity));
} else {
if (key) {
formattedResult[key] = {
fn: key,
value: true,
text: baseSchema[key].pos,
data: [entity],
data: [omitGeometry(entity)],
category: baseSchema[key].category,
};
}
Expand Down

0 comments on commit 4b12599

Please sign in to comment.