Fix the determination about profile_completed_at

This commit is contained in:
Seth Call 2025-06-23 19:56:36 -05:00
parent 8645328cce
commit 08008a6dc3
1 changed files with 5 additions and 1 deletions

View File

@ -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