Fix calendar missing bug.
This commit is contained in:
parent
2dbc2c6590
commit
0ea5fd2af4
|
@ -65,8 +65,11 @@ module VenueLinkFile
|
|||
if key_id.nil?
|
||||
self.calendar_dict[key] = Event.create(update_dict.merge(create_user_id: current_user_id)).id
|
||||
else
|
||||
calendar = Event.find(key_id)
|
||||
calendar.update_attributes(update_dict)
|
||||
calendar = Event.find(key_id) rescue nil
|
||||
calendar.update_attributes(update_dict) if !calendar.nil?
|
||||
if calendar.nil?
|
||||
self.calendar_dict[key] = Event.create(update_dict.merge(create_user_id: current_user_id)).id
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue