Skip to content

Commit

Permalink
remove workaround get requests before post requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Glatthard committed Aug 10, 2015
1 parent 0f27035 commit 18bc26c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
2 changes: 0 additions & 2 deletions ipynbsrv/web/views/collaborationgroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ def create(request):
client = get_httpclient_instance(request)

try:
# stupid create workaround (see containers)
client.collaborationgroups.get()
client.collaborationgroups.post(params)
messages.success(request, "Group `{}` created sucessfully.".format(params.get("name")))
except HttpClientError:
Expand Down
4 changes: 0 additions & 4 deletions ipynbsrv/web/views/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ def create(request):

if image:
try:
# does not make any sense, but seems like it won't work without this line
# Todo: find the actual problem!
client.containers.get()

# server and owner get set by the core automatically
client.containers.post(params)
messages.success(request, "Image created successfully.")
Expand Down
3 changes: 0 additions & 3 deletions ipynbsrv/web/views/shares.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def create(request):
# create a new tag
try:
tag_params = {"label": str(tag)}
t = client.tags.get()
t = client.tags.post(tag_params)
except Exception as e:
messages.error(request, api_error_message(e, tag_params))
Expand Down Expand Up @@ -105,8 +104,6 @@ def share_add_access_groups(request):
params = {}
params['access_groups'] = access_groups

# then call API to add the users to the group
client.shares.get()
try:
client.shares(share_id).add_access_groups.post(params)
messages.success(request, "The selected groups are now a member of this share.")
Expand Down

0 comments on commit 18bc26c

Please sign in to comment.