Fixed possibility to set ical feed to none.
This commit is contained in:
parent
8719c4350e
commit
0c7be7c346
2 changed files with 5 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
|||
</label>
|
||||
<div class="u-inlineBlock u-positionOrigin">
|
||||
<select class="form-control form-control--small js-list">
|
||||
<option>-</option>
|
||||
<option value="">-</option>
|
||||
<% for url, name of @ical_feeds: %>
|
||||
<option value="<%= url %>" <% if @attribute.value is url: %>selected<%end%>><%- @T(name) %></option>
|
||||
<% end %>
|
||||
|
|
|
@ -209,7 +209,10 @@ returns
|
|||
def sync(without_save = nil)
|
||||
return if !ical_url
|
||||
begin
|
||||
events = {}
|
||||
if ical_url && !ical_url.empty?
|
||||
events = Calendar.parse(ical_url)
|
||||
end
|
||||
|
||||
# sync with public_holidays
|
||||
if !public_holidays
|
||||
|
|
Loading…
Reference in a new issue