DmitrMakeev commited on
Commit
be391e9
·
verified ·
1 Parent(s): 0c5d530

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1586,6 +1586,12 @@ def add_data_ver_cur():
1586
 
1587
  user_data = {mapping_template_cur[key]: request.args.get(key, "") for key in mapping_template_cur}
1588
 
 
 
 
 
 
 
1589
  if curator_on_off == "1":
1590
  user_data['curator'] = curators[current_curator_index]
1591
 
 
1586
 
1587
  user_data = {mapping_template_cur[key]: request.args.get(key, "") for key in mapping_template_cur}
1588
 
1589
+ # Проверка наличия обязательных полей
1590
+ if not user_data.get('email'):
1591
+ return jsonify({'status': 'error', 'message': 'Missing email in contact data'}), 400
1592
+ if not user_data.get('name'):
1593
+ return jsonify({'status': 'error', 'message': 'Missing name in contact data'}), 400
1594
+
1595
  if curator_on_off == "1":
1596
  user_data['curator'] = curators[current_curator_index]
1597