equal
deleted
inserted
replaced
590 'scope_path': django_args['scope_path'], |
590 'scope_path': django_args['scope_path'], |
591 'role': role_name, |
591 'role': role_name, |
592 'status': 'group_accepted', |
592 'status': 'group_accepted', |
593 } |
593 } |
594 |
594 |
595 entity = request_logic.getFromFields(fields) |
595 entity = request_logic.getForFields(fields, unique=True) |
596 |
596 |
597 if entity and (entity.scope.status not in ['invalid', 'inactive']): |
597 if entity and (entity.scope.status not in ['invalid', 'inactive']): |
598 return |
598 return |
599 |
599 |
600 raise out_of_band.AccessViolation(message_fmt=DEF_CANNOT_CREATE_MSG) |
600 raise out_of_band.AccessViolation(message_fmt=DEF_CANNOT_CREATE_MSG) |
680 |
680 |
681 self.checkIsUser(django_args) |
681 self.checkIsUser(django_args) |
682 |
682 |
683 fields = { |
683 fields = { |
684 'link_id': django_args['link_id'], |
684 'link_id': django_args['link_id'], |
685 field_name: self.user, |
685 field_name: self.user.key().name(), |
686 } |
686 } |
687 |
687 |
688 entity = logic.getForFields(fields) |
688 entity = logic.getForFields(fields) |
689 |
689 |
690 if entity: |
690 if entity: |