Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
minor changes.
Changes in variable name and range for member_checked_status
  • Loading branch information
marcusgc committed May 19, 2015
1 parent 4d86012 commit ca987eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions networkapi/api_pools/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ def list_all_members_by_pool(request, id_server_pool):
raise exceptions.ScriptCheckStatusPoolMemberException(detail="Script did not return as expected.")

for pms in serializer_pools.data:
abc = script_out[id_server_pool]["%d"%pms["id"]]
if abc not in range(1,8):
member_checked_status = script_out[id_server_pool]["%d"%pms["id"]]
if member_checked_status not in range(0,8):
raise exceptions.ScriptCheckStatusPoolMemberException(detail="Status script did not return as expected.")
pms["member_status"] = abc
pms["member_status"] = member_checked_status

#Save to BD
pm = query_pools.get(id=pms["id"])
pm.member_status = abc
pm.member_status = member_checked_status
pm.save(request.user)

data["server_pool_members"] = serializer_pools.data
Expand Down Expand Up @@ -1037,4 +1037,4 @@ def management_pools(request):

except Exception, exception:
log.error(exception)
raise api_exceptions.NetworkAPIException()
raise api_exceptions.NetworkAPIException()

0 comments on commit ca987eb

Please sign in to comment.