Skip to content

Address Book silently overwrites existing contacts with duplicate names #18

Closed

Description

@SVarnavi06

Bug description

When a user adds a contact with a name that already exists, the application silently replaces the existing contact's details.

Steps to reproduce

  1. Run Beginner/14_address_book.py.
  2. Add a contact named rani with phone number 12345.
  3. Add another contact named rani with phone number 6789.
  4. Select View Contacts.

Actual result

The original contact is overwritten. Only the second contact is displayed.

Expected result

The application should warn the user before replacing an existing contact or ask for confirmation.

Impact

Users may unintentionally lose previously saved contact information.

Evidence

Reproduced locally by adding the same contact name twice.

Activity

  1. johanbeytell1 commented on Oct 30, 2026

    @johanbeytell1
    Member

    Hey there @SVarnavi06. Thanks for the bug report. We'll be sure to update the file with the new changes and put them in the project. We haven't even considered that overwriting might not be desired behavior for a contact list. We'll be sure to address this and feature you in the small tips section and project details for the specific project.

    Thanks for contributing.

  2. added a commit that references this issue on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ Proxy