Relative Content

Tag Archive for djangoforeign-keysunique-constraintcomposite-primary-key

Type Error while populating a model in Django with UniqueConstraint

I’m trying to build up my first project in Django and I’m having some issues while creating an entry into my model Prevision (including sales forecasts), which has a uniqueConstraint to ensure that there is only one forecast between a Supplier (model “Representada”) and a Customer (model “Cliente”) for a give year (field “Ano”).