Skip to content

Commit

Permalink
fixed a crash in Repo parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Honza Dvorsky committed May 2, 2015
1 parent 067c951 commit efc88c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion BuildaGitServer/Repo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public class Repo : GitHubEntity {
self.fullName = json.stringForKey("full_name")
self.repoUrlHTTPS = json.stringForKey("clone_url")
self.repoUrlSSH = json.stringForKey("ssh_url")
self.permissions = json.dictionaryForKey("permissions")

if let permissions = json.optionalDictionaryForKey("permissions") {
self.permissions = permissions
} else {
self.permissions = NSDictionary()
}

super.init(json: json)
}
Expand Down

0 comments on commit efc88c3

Please sign in to comment.