Skip to content

Commit

Permalink
Change variable id to appid. rockstor#896
Browse files Browse the repository at this point in the history
  • Loading branch information
Mchakravartula committed Jan 25, 2016
1 parent 80dc962 commit 01abf6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rockstor/storageadmin/urls/appliances.py
Expand Up @@ -22,5 +22,5 @@
urlpatterns = patterns(
'',
url(r'^$', ApplianceListView.as_view()),
url(r'^/(?P<id>\d+)$', ApplianceDetailView.as_view())
url(r'^/(?P<appid>\d+)$', ApplianceDetailView.as_view())
)
8 changes: 4 additions & 4 deletions src/rockstor/storageadmin/views/appliances.py
Expand Up @@ -138,12 +138,12 @@ def get(self, *args, **kwargs):
return Response()

@transaction.atomic
def put(self, request, id):
def put(self, request, appid):
try:
appliance = Appliance.objects.get(pk=id)
appliance = Appliance.objects.get(pk=appid)
except Exception, e:
logger.exception(e)
e_msg = ('Appliance(%s) does not exist' % id)
e_msg = ('Appliance(%s) does not exist' % appid)
handle_exception(Exception(e_msg), request)

try:
Expand All @@ -153,7 +153,7 @@ def put(self, request, id):
return Response()
except Exception, e:
logger.exception(e)
e_msg = ('Failed updating hostname for appliance with id = %d' % id)
e_msg = ('Failed updating hostname for appliance with id = %d' % appid)
handle_exception(e, request)

@transaction.atomic
Expand Down

0 comments on commit 01abf6c

Please sign in to comment.