Skip to content

Commit

Permalink
feat: Warn user on toolforge about bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dpriskorn committed Jan 25, 2024
1 parent beb13a4 commit d532547
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.py
@@ -1,4 +1,5 @@
import logging
import os
from typing import List, Optional
from urllib.parse import quote, unquote

Expand Down Expand Up @@ -154,6 +155,11 @@ def add_main_subject():
selected_qids = request.form.getlist("selected_qids[]")
topic = request.form.get("main_subject")
if selected_qids and topic:
if len(selected_qids) > 30 and "topic-curator" in os.environ.get('USER'):
return jsonify("Error: Toolforge does not support long URLs "
"so we cannot process this many QIDs at once. "
"An OAUTH rewrite is planned, see "
"https://github.com/dpriskorn/WikidataTopicCurator/issues/5")
# Handle the selected_qids as needed
print(f"Got topic: {topic}")
print("Selected QIDs:", selected_qids)
Expand Down

0 comments on commit d532547

Please sign in to comment.