Commit ae015bf5 authored by Alexander Færøy's avatar Alexander Færøy 🍍
Browse files

Set projects_limit after user creation (bug in GL).

parent be77c2e3
......@@ -6,15 +6,17 @@ def approve_user(model):
client = gitlab.Gitlab(GITLAB_URL, private_token=GITLAB_SECRET_TOKEN)
try:
client.users.create({
user = client.users.create({
"name": model.username,
"username": model.username,
"email": model.email,
"reset_password": True,
"projects_limit": 5,
"can_create_group": False,
"skip_confirmation": True, # The password reset mail is enough.
})
user.projects_limit = 5
user.save()
except Exception as e:
print("Error: {}".format(e))
return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment