Merge pull request #2841 from dmarcoux/legal-auto-prepare-review-GET

Use HTTP GET for /search/request/id API endpoint
This commit is contained in:
Stephan Kulow 2022-08-29 12:02:14 +02:00 committed by GitHub
commit 80f2461188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,8 +187,7 @@ class LegalAuto(ReviewBot.ReviewBot):
match += ' and (' + ' or '.join(sorted(batch)) + ')'
url = osc.core.makeurl(
self.apiurl, ['search', 'request', 'id'], {'match': match})
# prefer POST because of the length
root = ET.parse(osc.core.http_POST(url)).getroot()
root = ET.parse(osc.core.http_GET(url)).getroot()
for request in root.findall('request'):
self.delete_from_db(request.get('id'))