mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 20:40:17 +02:00
Case-insensitive group name to ID translation
Seems Discourse won't let you create `Group` if `group` already exists (`422 Name has already been taken`). Thanks @huberfe
This commit is contained in:
parent
6837f94e59
commit
58a333c67a
@ -214,7 +214,7 @@ class DiscourseManager:
|
||||
def get_or_create_group():
|
||||
groups = DiscourseManager._get_groups()
|
||||
for g in groups:
|
||||
if g['name'] == name:
|
||||
if g['name'].lower() == name.lower():
|
||||
return g['id']
|
||||
return DiscourseManager._create_group(name)['id']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user