Use the correct matching group

This commit is contained in:
Erik Weber 2020-07-03 11:01:17 +02:00
parent e993422106
commit 22eabef06a
No known key found for this signature in database
GPG Key ID: 05843120A7BB49E4

View File

@ -306,7 +306,7 @@ def login():
matches = re.match(description_pattern,group_description) matches = re.match(description_pattern,group_description)
if matches: if matches:
current_app.logger.info('Group {} matched regexp'.format(group_description)) current_app.logger.info('Group {} matched regexp'.format(group_description))
group_description = matches.group(0) group_description = matches.group(1)
else: else:
# Regexp didn't match, continue to next iteration # Regexp didn't match, continue to next iteration
next next
@ -318,7 +318,7 @@ def login():
matches = re.match(pattern,group_name) matches = re.match(pattern,group_name)
if matches: if matches:
current_app.logger.info('Group {} matched regexp'.format(group_name)) current_app.logger.info('Group {} matched regexp'.format(group_name))
group_name = matches.group(0) group_name = matches.group(1)
else: else:
# Regexp didn't match, continue to next iteration # Regexp didn't match, continue to next iteration
next next