Team254 / cheesy-parts

Part management database written for the 2013 season.
BSD 2-Clause "Simplified" License
22 stars 45 forks source link

Database collision #21

Open morops opened 5 years ago

morops commented 5 years ago

Error:

Sequel::UniqueConstraintViolation at /parts Mysql2::Error: Duplicate entry '8-1' for key 'project_id_and_part_number'

Steps to reproduce: -Create a new empty project -Create a new part -Create a new assembly -Create a new part (in the assembly, although this is the only option)

This can be avoided by creating a new top-level assembly before anything else. I found this issue about a year ago, it doesn't cause any other issues but it has come up again while working on new features for our fork. Perhaps by automatically creating the first top level assembly, this could be resolved for future first-time users.