def db_update_group(**kwargs):
 group_id = kwargs.pop('id')
 asset_id_list = kwargs.pop('asset_select')
 group = get_object(AssetGroup, id=group_id)
 for asset_id in asset_id_list:
  group_add_asset(group, asset_id)
 AssetGroup.objects.filter(id=group_id).update(**kwargs)

def db_update_group ( ** kwargs ) : group_id = kwargs . pop ( 'id' ) asset_id_list = kwargs . pop ( 'asset_select' ) group = get_object ( AssetGroup , id = group_id ) for asset_id in asset_id_list : group_add_asset ( group , asset_id ) AssetGroup . objects . filter ( id = group_id ) . update ( ** kwargs )
add a asset group in database .