Fix bug that lost photos when updating activities and work items
This commit is contained in:
@@ -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 }
|
||||
)
|
||||
|
||||
@@ -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 },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user