(self, domain, location_ids, commit=True)
reset locations to given list of location_ids. Before calling this, primary location
            should be explicitly set/unset via set_location/unset_location
reset locations to given list of location_ids. Before calling this, primary location
            should be explicitly set/unset via set_location/unset_location
reset locations to given list of location_ids . Before calling this primary location should be explicitly set / unset via set_location / unset_location
def reset_locations(self, domain, location_ids, commit=True):
        """
        reset locations to given list of location_ids. Before calling this, primary location
            should be explicitly set/unset via set_location/unset_location
        """
        membership = self.get_domain_membership(domain)
        membership.assigned_location_ids = location_ids
        if not membership.location_id and location_ids:
            membership.location_id = location_ids[0]
        self.get_sql_locations.reset_cache(self)
        if commit:
            self.save()
def reset_locations ( self , domain , location_ids , commit = True ) : membership = self . get_domain_membership ( domain ) membership . assigned_location_ids = location_ids if not membership . location_id and location_ids : membership . location_id = location_ids [ 0 ] self . get_sql_locations . reset_cache ( self ) if commit : self . save ( )