Skip to content

Commit

Permalink
Allow to update "count_limit" to "unlimited"
Browse files Browse the repository at this point in the history
JIRA: PDC-1135
  • Loading branch information
erichuanggit committed Nov 5, 2015
1 parent 5c394d1 commit 3e6bc7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pdc/apps/contact/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def _get_max_component_role_count(self, component_model, role):
order_by('-contact_count')[0]['contact_count']

def clean(self):
# don't need to do such check if count_limit set to UNLIMITED
if self.count_limit == ContactRole.UNLIMITED:
return
if self.pk:
role = ContactRole.objects.get(pk=self.pk)
old_limit = role.count_limit
Expand Down

0 comments on commit 3e6bc7f

Please sign in to comment.