DmitrMakeev commited on
Commit
1176ca5
1 Parent(s): 2e56ab6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -795,11 +795,11 @@ def update_or_insert_user(db_name, user_data, mapping_template, gog_url):
795
  else:
796
  transformed_data['ws_st'] = user_data.get('ws_st', "")
797
 
798
- # Не изменяем значение web_st
799
- if current_web_st is not None:
800
- transformed_data['web_st'] = current_web_st
801
  else:
802
- transformed_data['web_st'] = user_data.get('web_st', "")
803
 
804
  new_messages = transformed_data.get('b_mess', "")
805
  if current_messages:
@@ -836,6 +836,7 @@ def update_or_insert_user(db_name, user_data, mapping_template, gog_url):
836
 
837
 
838
 
 
839
  @app.route('/send_request', methods=['POST'])
840
  def send_request():
841
  token = request.form.get('token')
 
795
  else:
796
  transformed_data['ws_st'] = user_data.get('ws_st', "")
797
 
798
+ # Увеличиваем значение web_st на 1, если пользователь уже существует в базе данных
799
+ if current_web_st is not None and current_web_st != "":
800
+ transformed_data['web_st'] = int(current_web_st) + 1
801
  else:
802
+ transformed_data['web_st'] = 1
803
 
804
  new_messages = transformed_data.get('b_mess', "")
805
  if current_messages:
 
836
 
837
 
838
 
839
+
840
  @app.route('/send_request', methods=['POST'])
841
  def send_request():
842
  token = request.form.get('token')