adapt reporting command to new custom view URLs (#43164)
This commit is contained in:
parent
bc05147ced
commit
5a6a0f792a
|
@ -40,9 +40,9 @@ class Command(BaseCommand):
|
|||
if not reporting_user:
|
||||
raise CommandError('missing reporting user (%s)' % reporting_user_email)
|
||||
sheets = []
|
||||
for url in re.findall('href="(.*)?"', cell.text):
|
||||
for url in re.findall('href="(.*?)"', cell.text):
|
||||
url = html.unescape(url)
|
||||
url = re.sub(r'/backoffice/management/([a-z0-9/-]+)/\?', r'/api/forms/\1/ods?', url)
|
||||
url = re.sub(r'/backoffice/management/([a-z0-9_-]+)(/[a-z0-9_-]+)?/?(\?)?', r'/api/forms/\1/ods\2\3', url)
|
||||
resp = requests.get(url, remote_service='auto', user=reporting_user)
|
||||
if not resp.ok:
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue