[api] Fix postgresql-specific error in Variants tests

The problem was we were passing a number to PostgreSQL for a string field (the permalink field). PostgreSQL spat the dummy because it doesn't know how to translate between strings and integers.