mirror of
https://github.com/pretix/pretix.git
synced 2026-08-19 12:16:26 +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):
|
||||
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:
|
||||
match = ORDER_ID_RE.search(link.get("href", ""))
|
||||
if match:
|
||||
return match.group(1)
|
||||
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user