Skip to content

sz_command removes multiple consecutive spaces in record_id for add_record #294

@antaenc

Description

@antaenc

Calling add_record with sz_command with a record_id that has multiple spaces results in the multiple spaces being replaced with a single space.

(szcmd) add_record test "Joe  Smith" '{"NAME_FULL": "Joe Smith"}'

Record added

(szcmd) get_record test 'Joe  Smith'

{
  "DATA_SOURCE": "TEST",
  "RECORD_ID": "Joe Smith",
  "JSON_DATA": {
    "NAME_FULL": "Joe Smith"
  }
}

(szcmd)

There are 2 spaces between Joe and Smith, this results in the record being added but with only one space. Any multiple of spaces results in 1 space in the record added.

This is caused by the remove_per_cmd_settings method when checking for and removing any per command settings such as json, jsonl, nocolor, etc.

Metadata

Metadata

Assignees

Labels

pythonpython programming languagae

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions