[Bug fix] Course mode cannot start

- Fix a bug due to 4da3f38f6e that course mode cannot start
This commit is contained in:
Lost-MSth
2022-11-06 15:06:01 +08:00
parent e6cb0f8981
commit e22485e4e0

View File

@@ -269,7 +269,10 @@ class UserPlay(UserScore):
'''select * from songplay_token where token=:a ''', {'a': self.song_token}) '''select * from songplay_token where token=:a ''', {'a': self.song_token})
x = self.c.fetchone() x = self.c.fetchone()
if not x: if not x:
raise NoData('No token data.') self.is_world_mode = False
self.course_play_state = -1
return None
# raise NoData('No token data.')
self.song.set_chart(x[2], x[3]) self.song.set_chart(x[2], x[3])
if x[4]: if x[4]:
self.course_play = CoursePlay(self.c, self.user, self) self.course_play = CoursePlay(self.c, self.user, self)