diff --git a/g2p_social_registry/models/g2p_que_id_generation.py b/g2p_social_registry/models/g2p_que_id_generation.py index c1ad43d..c8373aa 100644 --- a/g2p_social_registry/models/g2p_que_id_generation.py +++ b/g2p_social_registry/models/g2p_que_id_generation.py @@ -9,7 +9,6 @@ class G2PQueIDGeneration(models.Model): registrant_id = fields.Char( string="Registrant ID", required=True, - unique=True, ) id_generation_request_status = fields.Selection( @@ -68,3 +67,6 @@ class G2PQueIDGeneration(models.Model): string="Last Attempt Datetime (Update)" ) + _sql_constraints = [ + ("registrant_id_uniq", "UNIQUE(registrant_id)", "registrant_id is an unique identifier!"), + ]