Problem with Entity Service API: CRUD operations

Solved by using beforeUpdate lifecycle hook:

module.exports = {
	async beforeUpdate(event) {
		const { data } = event.params;
		if (data.Prisutni) {
			data.Odrzan = true;
		} else {
			data.Odrzan = false;
		}
	}
}
1 Like