Skip to content

Editing a connection requires re-entering the API key #24

@plinss

Description

@plinss

Description

When editing an existing connection, the API key is left blank in the UI (which is perfect as you don't want to leak it). However, when saving changes, the form validation will not accept an empty field for the API key, requiring it to be re-entered even if it didn't change. This is a bother when changing just the name or URL of the connection.

It would be better to accept a blank API key when editing and just not change that value if left blank. Alternatively, put a sentinel value (a constant 32 character string that's distinct from an actual API key, like all '---') in the password field when editing so the user sees that there is a value, but can't retrieve the actual key, and wouldn't replace the API key during the save.

Steps to reproduce

  1. Create a connection
  2. Edit the connection, changing only the name
  3. Hit 'Save'

Expected behaviour

The edits are saved.

Actual behaviour

The save fails with a 'Please fill out this field' message for the API key.

Huntarr2 version

0.1.1

Deployment method

Binary

Relevant logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions