Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 2588489

Browse files
committed
fixed challenge find issue with nil value
1 parent a217da0 commit 2588489

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/challenge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def initialize(params={})
5252
end
5353

5454
# for challenge, cache it for 5 minutes
55-
def self.find(entity, current_user)
55+
def self.find(entity, current_user = nil)
5656
if current_user
5757
puts "[CHALLENGE][CACHE] ======== calling find challenge"
5858
Rails.cache.fetch("#{self.api_endpoint}/#{entity}-#{current_user.username}", :expires_in => ENV['MEMCACHE_CHALLENGE_EXPIRY'].to_i.minute) do

0 commit comments

Comments
 (0)