Skip to content

Commit

Permalink
fix(events): [PPT-1473] prefer metadata with ext_data over metadata w…
Browse files Browse the repository at this point in the history
…ithout (#335)
  • Loading branch information
chillfox authored Dec 2, 2024
1 parent 5b325ad commit d65cc7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/controllers/events.cr
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ class Events < Application
EventMetadata.by_tenant(tenant.id).by_events_or_master_ids(ical_uids, event_master_ids).each { |meta|
# where there might be multiple resource calendars on the event we want to pick
# metadatas that most closely match the request
next if (existing = metadatas[meta.ical_uid]?) && calendars[existing.resource_calendar]?
# and has the most information
next if (existing = metadatas[meta.ical_uid]?) && calendars[existing.resource_calendar]? &&
!(calendars[meta.resource_calendar]? && meta.ext_data)

metadatas[meta.ical_uid] = meta
if recurring_master_id = meta.recurring_master_id
Expand Down

0 comments on commit d65cc7a

Please sign in to comment.