models: avoid DeprecationWarning.