metron icon indicating copy to clipboard operation
metron copied to clipboard

Attribution model data should be unique to prevent duplicates

Open bpepple opened this issue 3 years ago • 1 comments

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 avatar Jun 10 '22 15:06 bpepple

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.

bpepple avatar Jun 10 '22 19:06 bpepple