Skip to Content
Menu
This question has been flagged
1 Reply
861 Views

how to cancel that option when one field have 1 information in specific.


for example, if field1 = lalalala, the user cant duplicate the document

Avatar
Discard
Best Answer

Hi,

You can use constraints for this,

_sql_constraints = [
        ('name_uniq', 'UNIQUE (field_name)',  'The name must be unique !')
    ]


Avatar
Discard
Related Posts Replies Views Activity
2
Dec 24
3113
1
Dec 24
343
4
Nov 24
1362
1
Sep 24
1132
1
Sep 24
1198