Repository: ansible-collections/community.general

Issue:
Gitlab groups 500 Internal Server Error
### Summary

Few weeks ago I wrote a playbook that was working fine.
Today i re-built the docker image again due to some new stuff I added to other roles (and it installed newer version of community.general) and my playbook stopped working.

It says : "Failed to create group: 500: 500 internal server error."
I checked logs on my gitlab-ce server and it says "KeyError","exception.message":"key not found: nil" (for the POST request thats in charge of creating the group.)

It seems like your module is broken? 3.7.0
By using 3.6.0 community general module it works.

### Issue Type

Bug Report

### Component Name

ansible-galaxy collection community.general
community.general.gitlab_group

### Ansible Version

```console (paste below)
$ ansible --version

```
2.9.6

### Configuration

```console (paste below)
$ ansible-config dump --only-changed

```
none.

### OS / Environment

Main server : Ubuntu 20.04.2 LTS
Docker image : Alpine linux

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)

```
- name: Create GitLab Group
  community.general.gitlab_group:
    api_url: https://gitlab.test.com/
    api_token: "{{ apitoken }}"
    name: "{{ gitlab_group_name }}"
    visibility: internal
    state: present

### Expected Results

HTTP Status code 200 and created group.

### Actual Results

```console (paste below)

```
    "changed": false,
    "invocation": {
        "module_args": {
            "api_password": null,
            "api_token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_url": "https://gitlab.test.com/",
            "api_username": null,
            "auto_devops_enabled": null,
            "description": null,
            "name": "test",
            "parent": null,
            "path": null,
            "project_creation_level": null,
            "require_two_factor_authentication": null,
            "state": "present",
            "subgroup_creation_level": null,
            "validate_certs": true,
            "visibility": "internal"
        }
    },
    "msg": "Failed to create group: 500: 500 Internal Server Error "

### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* `lib/ansible/galaxy`
* [`plugins/modules/source_control/gitlab/gitlab_group.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/source_control/gitlab/gitlab_group.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
resolved_by_pr #3453

Resolving patch:
diff --git a/plugins/modules/source_control/gitlab/gitlab_group.py b/plugins/modules/source_control/gitlab/gitlab_group.py
--- a/plugins/modules/source_control/gitlab/gitlab_group.py
+++ b/plugins/modules/source_control/gitlab/gitlab_group.py
@@ -206,10 +206,11 @@ def createOrUpdateGroup(self, name, parent, options):
                 'project_creation_level': options['project_creation_level'],
                 'auto_devops_enabled': options['auto_devops_enabled'],
                 'subgroup_creation_level': options['subgroup_creation_level'],
-                'require_two_factor_authentication': options['require_two_factor_authentication'],
             }
             if options.get('description'):
                 payload['description'] = options['description']
+            if options.get('require_two_factor_authentication'):
+                payload['require_two_factor_authentication'] = options['require_two_factor_authentication']
             group = self.createGroup(payload)
             changed = True
         else:


Test patch: