Quick correction to correct an exception when a repetition is set without rule

This commit is contained in:
echarp 2017-01-22 14:20:47 +01:00
parent ab88b5cbff
commit a59d293070
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ class EventCallbacks
def self.before_update(event)
return unless event.moderated_changed? && event.moderated?
event.decision_time = Time.zone.now
create_repeats event if event.repeat > 0
create_repeats event if event.repeat > 0 && event.rule
end
def self.after_update(event)

View File

@ -115,7 +115,7 @@
- @event.tags.each do |tag|
= link_to tag, tag_path(tag.name), rel: :tag
- if @event.repeat > 0
- if @event.repeat > 0 && @event.rule
%h3
%em.fa.fa-repeat
= @event.schedule