gists: Remove gist_type from update method in model. #4243
We do not allow to change the gist type from public to private or vice versa. Therefore there is no need to provide a ability in the model to do it.
This commit is contained in:
parent
c0a7c7b6c4
commit
cc96354c0b
2 changed files with 2 additions and 4 deletions
|
|
@ -298,7 +298,6 @@ class GistsController(BaseController):
|
|||
description=schema_data['description'],
|
||||
owner=c.gist.owner,
|
||||
gist_mapping=schema_data['nodes'],
|
||||
gist_type=schema_data['gist_type'],
|
||||
lifetime=schema_data['lifetime'],
|
||||
gist_acl_level=schema_data['gist_acl_level']
|
||||
)
|
||||
|
|
|
|||
|
|
@ -176,8 +176,8 @@ class GistModel(BaseModel):
|
|||
log.error(traceback.format_exc())
|
||||
raise
|
||||
|
||||
def update(self, gist, description, owner, gist_mapping, gist_type,
|
||||
lifetime, gist_acl_level):
|
||||
def update(self, gist, description, owner, gist_mapping, lifetime,
|
||||
gist_acl_level):
|
||||
gist = self._get_gist(gist)
|
||||
gist_repo = gist.scm_instance()
|
||||
|
||||
|
|
@ -204,7 +204,6 @@ class GistModel(BaseModel):
|
|||
gist.gist_description = description
|
||||
gist.gist_expires = gist_expires
|
||||
gist.owner = owner
|
||||
gist.gist_type = gist_type
|
||||
gist.acl_level = gist_acl_level
|
||||
self.sa.add(gist)
|
||||
self.sa.flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue