-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow having multiple contacts with same role for one component
Add a field count_limit to ContactRole to define the limit of this role for each component. The value default is 1, and define 0 as unlimited. When exceed the limit, a ValidationError exception will be raised. JIRA: PDC-1056
- Loading branch information
Showing
5 changed files
with
282 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('contact', '0003_auto_20151001_1309'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='contactrole', | ||
name='count_limit', | ||
field=models.IntegerField(default=1, help_text='Contact count limit of the role for each component.'), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='globalcomponentcontact', | ||
unique_together=set([('role', 'component', 'contact')]), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='releasecomponentcontact', | ||
unique_together=set([('role', 'component', 'contact')]), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters