Fix query error when saving tax rates

Fixes #6202
Merge pull request #6204 from om4james/issue-6202

Fix query error when saving tax rates