Skip to content

Commit

Permalink
edit maintanance flag when editing equipment
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Vinicius G. Cesario committed Sep 11, 2015
1 parent dbca493 commit 85f31cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion networkapiclient/Equipamento.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def inserir(self, name, id_equipment_type, id_model, id_group, maintenance=False

return self.response(code, xml)

def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo):
def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo, maintenance=None):
"""Change Equipment from by the identifier.
:param id_equip: Identifier of the Equipment. Integer value and greater than zero.
Expand Down Expand Up @@ -210,6 +210,8 @@ def edit(self, id_equip, nome, id_tipo_equipamento, id_modelo):
equip_map['id_tipo_equipamento'] = id_tipo_equipamento
equip_map['id_modelo'] = id_modelo
equip_map['nome'] = nome
if maintenance is not None:
equip_map['maintenance'] = maintenance

url = 'equipamento/edit/' + str(id_equip) + '/'

Expand Down

0 comments on commit 85f31cc

Please sign in to comment.