Metron-Project / metron

Django website for a comic book database
https://metron.cloud/
GNU General Public License v3.0
90 stars 7 forks source link

Attribution model data should be unique to prevent duplicates #118

Open bpepple opened 2 years ago

bpepple commented 2 years ago

Describe the bug Right now there is no validation done on new Attribution objects to verify the data isn't duplicated.

To Reproduce Noticed this when I update the 'Marvel Update' command, and got duplicate Attribution data.

Expected behavior New Attribution objects shouldn't be created.

Additional context Need to either add a unique_together constraint or other type of check.

bpepple commented 2 years ago

For now, dd968253b2abf1ebef593e61d5c0a57c256ee78e should fix the 'update_marvel' command, but should look further into whether it makes sense to add a constraint of some kind to the model.