Skip to content

Commit

Permalink
Merge branch '162-merge-contacts' into 232-delete-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kennsippell committed Dec 20, 2024
2 parents 145a8f8 + a0d14bc commit a0c5042
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/routes/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ export default async function place(fastify: FastifyInstance) {
}

const contactType = Config.getContactType(data.place_type);
const moveModel = hierarchyViewModel(op, contactType);
let moveModel;
if (HIERARCHY_ACTIONS.includes(op)) {
moveModel = hierarchyViewModel(op, contactType);
}

const hierarchyLevel = Config.getHierarchyWithReplacement(contactType).find(hierarchy => hierarchy.level === level);
if (!hierarchyLevel) {
throw Error(`not hierarchy constraint at ${level}`);
Expand Down

0 comments on commit a0c5042

Please sign in to comment.