Skip to content

Commit

Permalink
Do not save modified object on cluster GET
Browse files Browse the repository at this point in the history
Otherwise cluster may not be resized
  • Loading branch information
Ekaterina Chernova committed Jul 2, 2018
1 parent 35c7015 commit f49014c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions kqueen/blueprints/api/generic_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@ class GetView(GenericView):
methods = ['GET']
action = 'get'

def get_content(self, *args, **kwargs):
self.obj = self.hide_secure_data(self.obj)
def get_content(self, *args, hide_secure_data=True, **kwargs):
if hide_secure_data:
self.obj = self.hide_secure_data(self.obj)
return self.obj


Expand Down
4 changes: 2 additions & 2 deletions kqueen/blueprints/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ def dispatch_request(self, *args, **kwargs):
self.check_authentication()
self.set_object(*args, **kwargs)
self.check_authorization()
cluster = self.get_content(*args, **kwargs)
cluster = self.get_content(*args, hide_secure_data=False, **kwargs)
cluster.get_state()

cluster = self.hide_secure_data(self.obj)
return jsonify(cluster)


Expand Down

0 comments on commit f49014c

Please sign in to comment.