Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit d532547

Browse files
committed
feat: Warn user on toolforge about bug
1 parent beb13a4 commit d532547

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
from typing import List, Optional
34
from urllib.parse import quote, unquote
45

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

0 commit comments

Comments
 (0)