maryna7679 commited on
Commit
47503fe
·
1 Parent(s): 06fc90d

Bug fix 1

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -104,12 +104,15 @@ def cancel_edit():
104
 
105
 
106
  def change_completion_status(completion_status):
 
 
 
107
  global next_video_pointer
108
  try:
109
  change_video_completion_status(completion_status, (next_video_pointer + n_videos - 1) % n_videos)
 
110
  except Exception as e:
111
  return gr.Error(f"{get_string('error')} {str(e)}")
112
- return gr.Info(f'{get_string("change_video_completion_status_success")}')
113
 
114
 
115
  def get_next_components(show_incomplete_only):
 
104
 
105
 
106
  def change_completion_status(completion_status):
107
+ if user == "anonymous_user":
108
+ return gr.Warning(get_string("please_sign_in"))
109
+
110
  global next_video_pointer
111
  try:
112
  change_video_completion_status(completion_status, (next_video_pointer + n_videos - 1) % n_videos)
113
+ return gr.Info(get_string("change_video_completion_status_success"))
114
  except Exception as e:
115
  return gr.Error(f"{get_string('error')} {str(e)}")
 
116
 
117
 
118
  def get_next_components(show_incomplete_only):