Princeton-CDH / geniza

version 4.x of the Princeton Geniza Project
https://geniza.princeton.edu
Apache License 2.0
11 stars 2 forks source link

Tags may be saved with identical names, case-insensitive #1333

Closed blms closed 1 year ago

blms commented 1 year ago

testing notes

In the QA admin site, find an existing tag.

dev notes

It is currently possible to save two tags with the same name, with the only difference being that different letters are capitalized. Since Taggit uses the query tag = manager.get(name__iexact=name) when TAGGIT_CASE_INSENSITIVE=True, saving a document with one of these tags results in a MultipleObjectsReturned error. Simplest solution is to use case-insensitive uniqueness validation.

example: https://geniza.princeton.edu/admin/taggit/tag/?q=judaeo-arabic+poetry

kseniaryzhova commented 1 year ago

@blms works as expected! Closing, thank you!