Skip to content

Commit

Permalink
Fixed error #73
Browse files Browse the repository at this point in the history
- Added test in test_ui.py that would replicate the error by removing a repository that existed (3 to delete, 4 found)
- Added fix by using dyn_repositories. No strong understanding of why, would need to dive back into this.
  • Loading branch information
PonteIneptique committed Jun 22, 2017
1 parent b992928 commit 3a6d3fa
Show file tree
Hide file tree
Showing 5 changed files with 2,912 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Hook/models.py
Expand Up @@ -98,8 +98,8 @@ def get_id(self):
return str(self.uuid)

def remove_authorship(self, _commit=True):
for repo in self.repositories:
self.repositories.remove(repo)
for repository in self.dyn_repositories:
self.dyn_repositories.remove(repository)
if _commit is True:
db.session.commit()

Expand Down
5 changes: 5 additions & 0 deletions tests/fixtures/repos_ponteineptique.page2.alt2.header.json
@@ -0,0 +1,5 @@
{
"X-Served-By": "a474937f3b2fa272558fa6dc951018ad",
"Content-Type": "application/json; charset=utf-8",
"Link": "<https://api.github.com/user/repos?access_token={{access_token}}&affiliation=owner,collaborator,organization_member&page=1>; rel=\"prev\", <https://api.github.com/user/repos?access_token={{access_token}}&affiliation=owner,collaborator,organization_member&page=2>; rel=\"last\","
}

0 comments on commit 3a6d3fa

Please sign in to comment.