code4romania/monitorizare-vot

Importing a list of observers twice will duplicate the observers in the database.

sandrohanea opened this issue · 0 comments

Current behavior:

  1. Admin chooses to import a list of observers from a file.
  2. The observers from the file are added to the DB.
  3. In the admin app, the user is still on the add observer page with the data completed(file is selected).
  4. If the admin presses import again the list will be duplicated.

Expected behavior:

  1. Admin chooses to import a list of observers from a file.
  2. The observers from the file are added to the db.
  3. In the admin app, the user is still on the add observer page and the data is cleared. (On FE)
  4. If the admin selects the same file again, the database will be
    A => Updated
    B => Some Error appear.

I'd chose option A.
What do you think?