Skip to content

Commit

Permalink
Do not strip revision number from app ID string (#38)
Browse files Browse the repository at this point in the history
Attempting to strip the revision number from an app ID string which does not
contain a revision number will result in an invalid app ID.
Now `app.create_revision` should work with app ID's returned by `app.id`.
  • Loading branch information
jdagilliland authored and SenadI committed Sep 12, 2016
1 parent 3234164 commit 20401d9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions sevenbridges/models/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@ def create_revision(cls, id, revision, raw, api=None):
:param api: Api instance.
:return: App object.
"""
try:
id = id.rsplit('/', 1)[0]
except IndexError:
SbgError(message='Malformed app id %s, '
'expecting owner/project/app/revision' % id)

api = api if api else cls._API
app = api.post(url=cls._URL['create_revision'].format(
id=id, revision=revision), data=raw).json()
Expand Down

0 comments on commit 20401d9

Please sign in to comment.