[FIX] calendar: fix traceback when using studio color

Current behavior:
In calendar, when using studio to change the color (e.g. select : Created By)
you will get a traceback if you select the option to see everyone's calendar

Steps to reproduce:
- Install Studio and Calendar
- Go in calendar and start studio
- In the color field select "Created By"
- Save and go back to calendar
- Select the option to view everyone's calendar

opw-2971360

closes odoo/odoo#99929

X-original-commit: 7f73cecdf0816aabbfbaeb478b602b194df03d65
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
This commit is contained in:
roen-odoo
2022-09-09 19:53:32 +02:00
parent 9c1549915c
commit 9d095e4ecf
@@ -104,7 +104,7 @@
const value = event.record[fieldName];
const colorRecord = value[0];
const filter = this.loadParams.filters[fieldName];
const colorFilter = filter && filter.filters.map(f => f.value) || colorRecord;
const colorFilter = filter && filter.filters.map(f => f.value) || [colorRecord];
const everyoneFilter = filter && (filter.filters.find(f => f.value === "all") || {}).active || false;
let colorValue;
if (!everyoneFilter) {