OpenBeta / openbeta-graphql

The open source rock climbing API
https://openbeta.io
GNU Affero General Public License v3.0
41 stars 32 forks source link

Renaming an area does not allow you to create another area with the same name #408

Closed julianlam closed 1 week ago

julianlam commented 1 week ago

Steps to reproduce:

  1. Create an area abc
  2. Rename it to def
  3. Attempt to create a new area abc

Received error:

Unexpected error: E11000 duplicate key error collection: prod-openbeta.areas index: metadata.area_id_1 dup key: { metadata.area_id: UUID("6a4f8206-cea5-54a8-b5c3-a833520577c5") }

julianlam commented 1 week ago

Note: Editing an area to a once-used name seems to be fine.

CocoisBuggy commented 1 week ago

I think this may be linked to #409 It's a holdover from when we were frequently seeding data and didn't have many edit features for the actual data

CocoisBuggy commented 1 week ago

should be resolved by #410