diff --git a/app/lib/actions/locationActions.ts b/app/lib/actions/locationActions.ts index 6414d44..7accab4 100644 --- a/app/lib/actions/locationActions.ts +++ b/app/lib/actions/locationActions.ts @@ -369,7 +369,7 @@ export const deleteLocationById = withUser(async (user:AuthenticatedUser, locati if (deleteInSubsequentMonths) { // Get the location name first to find all locations with the same name const location = await dbClient.collection("lokacije") - .findOne({ _id: locationID, userId }, { projection: { bills: 0 } }); + .findOne({ _id: locationID, userId }, { projection: { name: 1 } }); if (location) { // Delete all locations with the same name in current and subsequent months