Skip to content

build_createbug filters out empty list of groups #210

@crazyscientist

Description

@crazyscientist

Preface

Bugzilla allows the definition of groups a bug gets put into by default. While one can deselect these defaults in the web UI, the API docs suggest to use an empty array.

Description

However, Bugzilla.build_createbug filters out such an empty list:

from bugzilla import Bugzilla
bz = Bugzilla(url="https://bugzilla.suse.com")
createinfo = bz.build_createbug(summary="Summary", description="Hello World", groups=[])
print(*createinfo.items(), sep="\n")
('summary', 'Summary')
('description', 'Hello World')

Expected behavior

As a user of the library I would expect that Bugzilla.build_createbug produces a data object that can be sent to the server without the need for editing.

So, if a valid value (empty list) is provided for groups, the method should not filter it out.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions