Was calling model on schema twice, causing overwrite issues and issues with querying. Solved, set query as variable and passing into function. Next steps are dealing with the 60+ records one by one