[MOS-663] Regression fix

Fixed a regression that the SMS template list showed always
the state representing no templates defined, regardless if
there were any in the database.

There's a minor side effect that querying the database and
refreshing the window is doubled which can be seen in
debugging, but it's unnoticeable in usage.
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea
500 Internal Server Error

Gitea Version: 1.28.0+dev-477-g8b6ad49a5f