Fix bug that lost photos when updating activities and work items

This commit is contained in:
John Lyon-Smith
2018-05-15 09:37:14 -07:00
parent 609bb1c3d5
commit 77ed56ddf5
3 changed files with 4 additions and 4 deletions

View File

@@ -2,8 +2,8 @@ import React from "react"
import { Platform } from "react-native"
export const config = {
//localIPAddr: "192.168.1.175",
localIPAddr: "192.168.1.14",
localIPAddr: "192.168.1.175",
//localIPAddr: "192.168.1.14",
viroAPIKey: "06F37B6A-74DA-4A83-965A-7DE2209A5C46",
googleGeocodeAPIKey: "AIzaSyCs4JVT6gysnY5dAJ7KjVJYeykLv_xz1GI",
googleGeocodeURL: "https://maps.googleapis.com/maps/api/geocode/json",

View File

@@ -18,7 +18,7 @@ export let activitySchema = new Schema(
notes: { type: String, required: true },
fromStreetNumber: Number,
toStreetNumber: Number,
photos: [Schema.Types.ObjectId],
photos: { type: [Schema.Types.ObjectId], default: undefined },
},
{ timestamps: true, id: false }
)

View File

@@ -17,7 +17,7 @@ export const workItemSchema = new Schema(
coordinates: [Number],
},
address: String,
photos: [{ type: Schema.Types.ObjectId }],
photos: [{ type: Schema.Types.ObjectId, default: undefined }],
details: String,
ticketNumber: { type: Number, default: 0 },
},