code: def check_unique(self):
          
          result = yield views.repository_name.values(key=self.name)
          repo_id = getattr(self, 'id', None)
          repos = {x for x in result if x != repo_id and x}
  
          if repos:
              raise exceptions.ValidationError(
                  "Repository with name '{}' already exists".format(self.name))
docs: Check the repository's name is unique