Skip to content

Commit

Permalink
Merge pull request #1829 from codebar/event-calendar-only-include-add…
Browse files Browse the repository at this point in the history
…ress-if-event-has-address

Update EventCalendar service to only include address if event has one
  • Loading branch information
matyikriszta committed Nov 14, 2022
2 parents fc1f687 + 3f58518 commit 8b38242
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/services/event_calendar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ def calendar
private

def setup_event
address = AddressPresenter.new(event.venue.address)
address = AddressPresenter.new(event.venue.address) if event.venue.present?
calendar.event do |e|
e.organizer = event.email.to_s
e.dtstart = event.date_and_time
e.dtend = event.ends_at
e.summary = event.name
e.location = address.to_s
e.location = address&.to_s
e.ip_class = 'PRIVATE'
end
end
Expand Down

0 comments on commit 8b38242

Please sign in to comment.