'Add remote repository relationship to the project instance'

def save(self, commit=True):

    instance = super(ProjectBasicsForm, self).save(commit)
    remote_repo = self.cleaned_data.get('remote_repository', None)
    if remote_repo:
        if commit:
            remote_repo.project = self.instance
            remote_repo.save()
        else:
            instance.remote_repository = remote_repo
    return instance
