addons icon indicating copy to clipboard operation
addons copied to clipboard

Make more models depend on `ModelBase`

Open diox opened this issue 3 years ago • 2 comments

Our ModelBase provides a created and modified date field, as well as a few useful methods. The following models do not currently inherit from it:

  • Reindexing
  • TranslationSequence
  • AddonCategory
  • AddonUser
  • AddonUserPendingConfirmation
  • FrozenAddon
  • GroupUser
  • ApplicationsVersions
  • RssKey
  • Config

Some of these would benefit from inheriting from ModelBase, especially as we might add more features to it in the future. At the very least for Config it would be really useful.

┆Issue is synchronized with this Jira Task

diox avatar Nov 24 '22 14:11 diox

Note: when implementing this, make sure ESAddonSerializer passes created=None (or a more appropriate value coming from ES data) when creating new instances of these models, because of https://github.com/mozilla/addons/issues/9003.

diox avatar Nov 28 '22 10:11 diox

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-135

KevinMind avatar May 03 '24 17:05 KevinMind