FIX: save event details in right order

approved

#1

FIX: save event details in right order

diff --git a/jobs/scheduled/update_holiday_usernames.rb b/jobs/scheduled/update_holiday_usernames.rb
index 4166a22..2b82ed8 100644
--- a/jobs/scheduled/update_holiday_usernames.rb
+++ b/jobs/scheduled/update_holiday_usernames.rb
@@ -12,7 +12,7 @@ module Jobs
       user_ids = []
       users_on_holiday = []
 
-      details.values.each do |(_, from, to, username)|
+      details.values.each do |_, from, to, username|
         from_time = Time.parse(from)
         to_time   = to ? Time.parse(to) : from_time + 24.hours
 
diff --git a/lib/event_updater.rb b/lib/event_updater.rb
index b5e455c..c91bdf2 100644
--- a/lib/event_updater.rb
+++ b/lib/event_updater.rb
@@ -25,9 +25,9 @@ module DiscourseCalendar
 
       detail = [
         PrettyText.excerpt(html, 30, strip_links: true, text_entities: true),
-        post.user.username_lower,
         from.iso8601.to_s,
         to ? to.iso8601.to_s : nil,
+        post.user.username_lower,
         dates[0]["recurring"].presence
       ]

GitHub sha: 30970217


Approved #2