Use Creatable

This commit is contained in:
Vincent Jacques
2012-02-23 19:16:02 +00:00
parent b822771a56
commit 68e26c62bc
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -86,7 +86,7 @@ Repository = GithubObject(
ListAttribute( "contributors", NamedUser, ListGetable( [], [] ) ),
ListAttribute( "watchers", NamedUser, ListGetable( [], [] ) ),
Editable( [ "name" ], [ "description", "homepage", "public", "has_issues", "has_wiki", "has_downloads" ] ),
ListOfObjects( "git/refs", GitRef, creatable = True, singularName = "git_ref" ),
ListOfObjects( "git/refs", GitRef, Creatable( "git_ref", [ "ref", "sha" ], [] ) ),
ObjectGetter( "git_ref", GitRef, lambda repo, ref: { "_repo": repo, "ref": ref } ),
)
Repository._addAttributePolicy( ComplexAttribute( "parent", Repository ) )