def group_add_asset(group, asset_id=None, asset_ip=None):
 if asset_id:
  asset = get_object(Asset, id=asset_id)
 else:
  asset = get_object(Asset, ip=asset_ip)
 if asset:
  group.asset_set.add(asset)

def group_add_asset ( group , asset_id = None , asset_ip = None ) : if asset_id : asset = get_object ( Asset , id = asset_id ) else : asset = get_object ( Asset , ip = asset_ip ) if asset : group . asset_set . add ( asset )
asset group add a asset .