gothinkster / django-realworld-example-app

1.61k stars 637 forks source link

Faulty unique constraint on slug field of Tag model #19

Open gustavengstrom opened 6 years ago

gustavengstrom commented 6 years ago

The Tag model has "unique=True" set for the slug field. This must be an error since it implies that we can only have one tag per slug... Below is the code pasted from conduit/articles/models.py.

class Tag(TimestampedModel): tag = models.CharField(max_length=255) slug = models.SlugField(db_index=True, unique=True)