Fix the determination about profile_completed_at
This commit is contained in:
parent
8645328cce
commit
08008a6dc3
|
|
@ -422,7 +422,7 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
# check if the profile looks complete
|
# check if the profile looks complete
|
||||||
if musician_instruments.length > 0 || genre_players.length > 0
|
if genre_players.length > 0 || has_set_an_instrument
|
||||||
User.where(id: self.id).update_all(profile_completed_at: Time.now)
|
User.where(id: self.id).update_all(profile_completed_at: Time.now)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -506,6 +506,10 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_set_an_instrument
|
||||||
|
musician_instruments.length > 1 || (musician_instruments.length == 1 && musician_instruments.first.instrument_id != 'other')
|
||||||
|
end
|
||||||
|
|
||||||
def send_lesson_poke(first = false)
|
def send_lesson_poke(first = false)
|
||||||
if first && self.remind_take_lesson_times > 0
|
if first && self.remind_take_lesson_times > 0
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue