Skip to content

Commit

Permalink
add registrant_id_uniq constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
PSNAppz committed Nov 28, 2024
1 parent afd526d commit e4c23ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion g2p_social_registry/models/g2p_que_id_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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!"),
]

0 comments on commit e4c23ed

Please sign in to comment.