Skip to content

Commit 25b5b01

Browse files
committed
Tests for ide/git.py, ide/api/git.py, deleting unreachable code
removes an unreachable block of code from ide/api/git.py
1 parent fb52400 commit 25b5b01

File tree

6 files changed

+659
-52
lines changed

6 files changed

+659
-52
lines changed

ide/api/git.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,6 @@ def set_project_repo(request, project_id):
6161
except:
6262
pass
6363

64-
# Just clear the repo if none specified.
65-
if repo == '':
66-
project.github_repo = None
67-
project.github_branch = None
68-
project.github_last_sync = None
69-
project.github_last_commit = None
70-
project.github_hook_uuid = None
71-
project.save()
72-
return json_response({'exists': True, 'access': True, 'updated': True, 'branch_exists': True})
73-
7464
if not ide.git.git_verify_tokens(request.user):
7565
return json_failure("No GitHub tokens on file.")
7666

@@ -153,4 +143,4 @@ def remove_hooks(repo, s):
153143
if hook.name != 'web':
154144
continue
155145
if s in hook.config['url']:
156-
hook.delete()
146+
hook.delete()

0 commit comments

Comments
 (0)