@overmap-ai/core 1.0.68 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3963,9 +3963,6 @@ class AssetService extends BaseApiService {
3963
3963
  }
3964
3964
  update(payload) {
3965
3965
  const { store } = this.client;
3966
- if (!payload.canvas_marker && !payload.geo_marker) {
3967
- throw new Error("Asset must have either a canvas_marker or geo_marker");
3968
- }
3969
3966
  const asset = selectAssetById(payload.offline_id)(store.getState());
3970
3967
  if (!asset) {
3971
3968
  throw new Error(`No asset with id ${payload.offline_id} found in the store`);
@@ -3974,6 +3971,9 @@ class AssetService extends BaseApiService {
3974
3971
  ...asset,
3975
3972
  ...payload
3976
3973
  };
3974
+ if (!updatedAsset.canvas_marker && !updatedAsset.geo_marker) {
3975
+ throw new Error("Asset must have either a canvas_marker or geo_marker");
3976
+ }
3977
3977
  this.dispatch(updateAsset(updatedAsset));
3978
3978
  const promise = this.enqueueRequest({
3979
3979
  description: "Edit asset",
@@ -5939,7 +5939,8 @@ class FormSubmissionService extends BaseUploadService {
5939
5939
  description: "Delete user form submissions",
5940
5940
  method: HttpMethod.PATCH,
5941
5941
  url: `/forms/submissions/${updatedSubmission.offline_id}/`,
5942
- payload,
5942
+ // TODO: send just payload when FormSubmissionDeserializer is updated to handle partial updates
5943
+ payload: updatedSubmission,
5943
5944
  blockers: [updatedSubmission.offline_id],
5944
5945
  blocks: [updatedSubmission.offline_id]
5945
5946
  });