Fix warning when accessing coupons created in pre-2.1 installs
Merge pull request #4340 from maxrice/rest-api-warning-fixes

Fix warning when accessing coupons created in pre-2.1 installs