changed getCategories function editevent model (front)