Skip to content
Snippets Groups Projects
Commit d13086ba authored by tmn21's avatar tmn21 :rocket:
Browse files

ISSUE #51: CREATE attribute high_streak

parent b8b2f1e3
No related branches found
No related tags found
No related merge requests found
Pipeline #34660 failed
...@@ -396,6 +396,8 @@ class User < ApplicationRecord ...@@ -396,6 +396,8 @@ class User < ApplicationRecord
if self.last_action_at==Date.yesterday if self.last_action_at==Date.yesterday
self.update(last_action_at: Date.today) self.update(last_action_at: Date.today)
self.update(streak: streak+1) self.update(streak: streak+1)
if.high_streak < self.streak
self.update(high_streak: streak)
return return
end end
......
...@@ -31,8 +31,6 @@ class LearningObjectPublisher ...@@ -31,8 +31,6 @@ class LearningObjectPublisher
draft.id_dspace = item.id draft.id_dspace = item.id
draft.publisher = publisher draft.publisher = publisher
draft.save draft.save
draf.publisher.update_streak()
update_dspace(draft) update_dspace(draft)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment