mirror of
https://github.com/pretix/pretix.git
synced 2026-08-25 13:12:00 +00:00
fix tests
This commit is contained in:
@@ -564,8 +564,13 @@ ORDER_ID_RE = re.compile(r"/checkout/orders/([^/?]+)")
|
|||||||
|
|
||||||
|
|
||||||
def get_order_id(links):
|
def get_order_id(links):
|
||||||
|
for link in links:
|
||||||
|
if link.get('rel', "") == "up" and link.get('href', None) is not None:
|
||||||
|
return link['href'].split('/')[-1]
|
||||||
|
|
||||||
for link in links:
|
for link in links:
|
||||||
match = ORDER_ID_RE.search(link.get("href", ""))
|
match = ORDER_ID_RE.search(link.get("href", ""))
|
||||||
if match:
|
if match:
|
||||||
return match.group(1)
|
return match.group(1)
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user