Move PROJECT_OBSERVATION_FIELDS to fields

This commit is contained in:
Johannes Klein committed 2026-06-19 23:58:11 +02:00
1 parent 79a461560a
commit e79466755d
2 files changed
+9 -7

No files matched your search

+7
View File
@@ -38,3 +38,10 @@ export const OBSERVATION_FIELD_VALUE_FIELDS = {
uuid: true,
value: true,
};
export const PROJECT_OBSERVATION_FIELDS = {
id: true,
project: PROJECT_FIELDS,
project_id: true,
uuid: true,
};
+2 -7
View File
@@ -1,5 +1,5 @@
import { Realm } from "@realm/react";
import { PROJECT_FIELDS } from "api/fields";
import { PROJECT_FIELDS, PROJECT_OBSERVATION_FIELDS } from "api/fields";
import { Alert } from "react-native";
import { getNowISO } from "sharedHelpers/dateAndTime";
import { log } from "sharedHelpers/logger";
@@ -63,12 +63,7 @@ class Observation extends Realm.Object {
private_location: true,
private_place_guess: true,
project_ids: true,
project_observations: {
id: true,
project: PROJECT_FIELDS,
project_id: true,
uuid: true,
},
project_observations: PROJECT_OBSERVATION_FIELDS,
non_traditional_projects: {
project: PROJECT_FIELDS,
},