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:
Martin Bornhold 2016-09-26 16:26:33 +02:00
parent c0a7c7b6c4
commit cc96354c0b
2 changed files with 2 additions and 4 deletions

View file

@ -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']
)

View file

@ -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()