Skip to content

Commit

Permalink
don't ovverride with None during update. rockstor#1026
Browse files Browse the repository at this point in the history
  • Loading branch information
schakrava committed Nov 30, 2015
1 parent ef937df commit d758ac8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/rockstor/storageadmin/views/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ class NetworkMixin(object):

@staticmethod
def _update_ni_obj(nio, values):
nio.dname = values.get('dname', None)
nio.mac = values.get('mac', None)
nio.dname = values.get('dname', nio.dname)
nio.mac = values.get('mac', nio.mac)
nio.method = values.get('method', 'manual')
nio.autoconnect = values.get('autoconnect', 'no')
nio.netmask = values.get('netmask', None)
nio.ipaddr = values.get('ipaddr', None)
nio.gateway = values.get('gateway', None)
nio.dns_servers = values.get('dns_servers', None)
nio.ctype = values.get('ctype', None)
nio.dtype = values.get('dtype', None)
nio.dspeed = values.get('dspeed', None)
nio.state = values.get('state', None)
nio.netmask = values.get('netmask', nio.netmask)
nio.ipaddr = values.get('ipaddr', nio.ipaddr)
nio.gateway = values.get('gateway', nio.gateway)
nio.dns_servers = values.get('dns_servers', nio.dns_servers)
nio.ctype = values.get('ctype', nio.ctype)
nio.dtype = values.get('dtype', nio.dtype)
nio.dspeed = values.get('dspeed', nio.dspeed)
nio.state = values.get('state', nio.state)
return nio

@staticmethod
Expand Down

0 comments on commit d758ac8

Please sign in to comment.