Commit 065b135f authored by Dmitry Volodin's avatar Dmitry Volodin Committed by Andrey Vertiprahov
Browse files

Merge branch 'noc-1286' into 'master'

noc/noc#1286 Fix object set rack number.

See merge request noc/noc!3471

(cherry picked from commit f3879289)

4d3af555 Fix object set rack number.
parent e30e8be3
...@@ -79,7 +79,7 @@ class RackPlugin(InvPlugin): ...@@ -79,7 +79,7 @@ class RackPlugin(InvPlugin):
def api_set_rack_load(self, request, id, cid, position_front, position_rear, shift): def api_set_rack_load(self, request, id, cid, position_front, position_rear, shift):
o = self.app.get_object_or_404(Object, id=id) o = self.app.get_object_or_404(Object, id=id)
co = self.app.get_object_or_404(Object, id=cid) co = self.app.get_object_or_404(Object, id=cid)
if co.container != o.id: if co.container.id != o.id:
return self.app.response_not_found() return self.app.response_not_found()
if position_front: if position_front:
co.set_data("rackmount", "position", position_front) co.set_data("rackmount", "position", position_front)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment