Flagging a Project Twice Makes the Cloud Assume We Are Trying to Add Project to a Collection

Please fill out these questions for all feature requests and bug reports. If you're requesting a feature, please let us know why this feature is important or useful, not just what it should do.
Thanks!

  1. What browsers and OS show this problem?
    Chrome Version 81.0.4044.138 (Official Build) (64-bit), Windows 10 Pro
  2. Please share an example project (if possible).
    N/A
  3. Describes the steps to reproduce this issue.
    Report a project twice or more
  4. What does Snap! currently do?
    Assumes we are trying to add the project to a collection, displays an error message (/usr/local/share/lua/5.1/lapis/application.lua:401: /usr/local/share/lua/5.1/lapis/db/postgres.lua:95: INSERT INTO "collection_memberships" ("created_at", "updated_at", "collection_id", "project_id", "user_id") VALUES ('2020-05-20 09:47:41', '2020-05-20 09:47:41', 0, 9383942, 519956) RETURNING "collection_id", "project_id" ERROR: duplicate key value violates unique constraint "collection_memberships_collection_id_project_id_user_id_idx" Key (collection_id, project_id, user_id)=(0, 9383942, 519956) already exists. stack traceback: [C]: in function 'error' /usr/local/share/lua/5.1/lapis/db/postgres.lua:95: in function 'insert' /usr/local/share/lua/5.1/lapis/db/postgres/model.lua:193: in function 'create' ./controllers/collection.lua:362: in function <./controllers/collection.lua:341>)
  5. What should Snap! do instead?
    Do nothing

Yeah, it's a known bug. :confused:

Flagging is really just a special collection. We'll get to it sometime, but it's a pretty low priority.

That explains. :smiley:

It's on my short-term TODO, probably sometime this month :slight_smile: