It is to avoid a "RuntimeError: maximum recursion depth exceeded" when change location_id.
ids was just assigned in ids_to_check so, when ids_to_check change, ids change too and the write is not done with right parameter, an we get the above error.
With list(ids) we create a new list, so ids and ids_to_check are not same.
It is to avoid a "RuntimeError: maximum recursion depth exceeded" when change location_id.
ids was just assigned in ids_to_check so, when ids_to_check change, ids change too and the write is not done with right parameter, an we get the above error.
With list(ids) we create a new list, so ids and ids_to_check are not same.