Skip to content

Commit

Permalink
Update case.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislaw-zakrzewski committed Nov 22, 2024
1 parent 493cb70 commit dbb52a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data-serving/data-service/src/controllers/case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const caseFromDTO = async (receivedCase: CaseDTO) => {
}

const geometry = aCase.location?.geometry;
if (!geometry.latitude || !geometry.longitude) delete aCase.location.geometry;
if (!geometry || !geometry.latitude || !geometry.longitude) delete aCase.location.geometry;

const user = await User.findOne({ email: receivedCase.curator?.email });
if (user) {
Expand Down

0 comments on commit dbb52a0

Please sign in to comment.